@kinday/njv
v0.4.0
Published
⚠️ **Work in progress! Nothing to see here!** ⚠️
Downloads
379
Readme
njv
⚠️ Work in progress! Nothing to see here! ⚠️
Docs
Import:
import validate from 'njv'
Interface:
const schema = { type: 'number' }
console.log(validate(schema, 5))
// { valid: true, errors: [] }
console.log(validate(schema, 'invalid'))
// {
// valid: false,
// errors: [
// {
// absoluteInstancePath: [],
// absoluteSchemaPath: ["type"],
// context: undefined,
// validator: 'type',
// validatorValue: 'number',
// }
// ]
// }