nats-ex-joi-validator
v0.2.0
Published
Validate [NATS EX](https://github.com/zhaoyao91/nats-ex) data using [Joi](https://github.com/hapijs/joi).
Downloads
4
Readme
NATS EX Joi Validator
Validate NATS EX data using Joi.
Installation
npm i nats-ex-joi-validator
Usage
const Joi = require('joi')
const validate = require('nats-ex-joi-validator')
const validator = validate({
name: Joi.string().required()
})
natsEx.registerMethod('hello', validator, ({name}) => `Hello ${name}`)
License
MIT