@kinday/njv

0.4.0 • Public • Published

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',
//     }
//   ]
// }

Readme

Keywords

none

Package Sidebar

Install

npm i @kinday/njv

Weekly Downloads

41

Version

0.4.0

License

none

Unpacked Size

92.1 kB

Total Files

6

Last publish

Collaborators

  • kinday