1.0.0 • Published 6 years ago

feathers-hooks-validate-superstruct v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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)
  }
});