miller
Schema validator for objects. Best used as a sanity check for devs, and not to
validate user input (e.g. we're using throw
).
Installation
$ npm i --save miller
Overview
var miller = ; var schema = ; ;// => {code: 302, message: 'foo-bar'}
API
miller(schema)
Create a validator based on a provided schema object. Input types can be JavaScript primitives only.
var schema = ;
miller()(input)
Check an object against the provided schema. If the schema doesn't match the
input throws a TypeError
.
;