vvee
Dead-simple object schema parsing.
vvee()({}, {})
-> {}
Install
Install yarn. Then:
yarn add vvee
Example
const vvee = const types: t = vvee const def = string: t 0 boolean: t array: x * x object: string: t number: t const data = string: 'a' number: -1 boolean: null const result = data defconsole
API
vvee(schema: Object?)
- Creates a new parser with the given schema, or just
use the defaults. You can override all behavior by providing your own
custom schema. This returns:
vee(data: Object, definition: Object)
- Given data and a type definition,
parses data returning a new object.
Development
To publish a new version of the package, install np then run:
np