Olian04 / Recordari

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

Extract the assertion logic into its own assertion library #39

Open Olian04 opened 5 years ago

Olian04 commented 5 years ago

The current API is really powerful and could quite easily be extracted and published as its own assertion library.

Current API if extracted:

const { assert, R } = require('r-assert');
// assert(someValue, ...constraints: R[])

const someVariable = ...
assert(someVariable,
  R.String.Either(['dev', 'prod'])
);