feathers-hooks-validate-superstruct
v1.0.0
Published
FeathersJS hook for validating input using superstruct
Downloads
2
Maintainers
Readme
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)
}
});