Olian04 / Recordari

Recordari is a type and structure validation tool for configuration files
MIT License
4 stars 0 forks source link

Change the name? #1

Closed Olian04 closed 5 years ago

Olian04 commented 6 years ago

A "record" in computer science usually describes an immutable data-object. This project has grown more into a type and structure validation tool for configuration files.

Olian04 commented 6 years ago

Constrain?

const { Constraint, C } = require('constrain');
const COptions = Constraint('Options', {
  foo: C.Number
});
Olian04 commented 6 years ago

Apparently what I'm making is usually refereed to as the Specification pattern.

the specification pattern is a particular software design pattern, whereby business rules can be recombined by chaining the business rules together using boolean logic.

Olian04 commented 6 years ago

Maybe ryjs [ryse] / RyJS [ry j s]?

const { Spec, R } = require('ryjs');
const OptionSpec= Spec('Options', {
  foo: R.Number
});
Olian04 commented 6 years ago

Or maybe we should keep Record.js?

You define a Record type with a set of constraints describing how a record of that type should look. Then you create a Record of the given record type.

const { Record, R } = require('record.js');

const ROptions = Record('Options', {
  foo: R.Number
});
Olian04 commented 5 years ago

Npm thinks Record.js is to similar to Record-js(which already exsists).

So maybe: Recordari? From the etymologi of the word Record. Recordari is latin for "remember". So the argument could be that you create a Record of an object in order to remember what it should look like, and then you can test an object to see if it fits the memory of how the object should look.

https://www.google.se/search?q=etymologi+record&oq=etymologi+record&aqs=chrome..69i57.9252j1j1&sourceid=chrome&ie=UTF-8

Olian04 commented 5 years ago

Ended up using Recordari