feathers-hooks-validate-superstruct

1.0.0 • Public • Published

feathers-hooks-validate-superstruct

FeathersJS hook for validating input using superstruct

Install

npm install feathers-hooks-validate-superstruct

Usage

const validateSuperstruct = require('feathers-hooks-validate-superstruct');
 
const app = ...; // feathers app object
const Struct = ...; // superstruct instance
 
app.service('service-name').hooks({
  before: {
    create: validateSuperstruct(Struct)
  }
});

Package Sidebar

Install

npm i feathers-hooks-validate-superstruct

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.35 kB

Total Files

8

Last publish

Collaborators

  • raymond-h