subschema-server-utils

1.6.1 • Public • Published

Subschema Server Utils

This project provides validateFactory for easy consumption on the server side. When the server only needs to validate data against a schema it may or may not need to be

Installation

  npm i subschema-server-utils --save
 

Usage:

validateFactory returns a function, takes a schema and a loader. The returned function takes a value or valueManager and returns a promise. If no errors, the promise returns null, other wise an object containing the errors is returned

see tests for more information on usage.

There are two usable files, that provide this. One has all the dependencies built in (the default). The other depends on subschema to use the existing subschema module.

var externals = require('subschema-server-utils/externals')

Dependencies (1)

Dev Dependencies (26)

Package Sidebar

Install

npm i subschema-server-utils

Weekly Downloads

2

Version

1.6.1

License

ISC

Last publish

Collaborators

  • speajus