fastify-envalid
v1.0.0
Published
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) ![CI workflow](https://github.com/alemagio/fastify-envalid/workflows/CI%20workflow/badge.svg)
Downloads
35
Maintainers
Readme
fastify-envalid
Supports Fastify versions 3.x
Install
npm i fastify-envalid
Usage
Require fastify-envalid
and register.
const fastify = require('fastify')()
fastify.register(require('fastify-envalid'))
fastify.listen(3000)
The plugin will create 3 decorators on your fastify
instance:
cleanEnv
- A function which is exactlyenvalid
cleanEnvvalidators
- An object that contains all theenvalid
validatorsmakeValidator
- A function which is exactlyenvalid
makeValidators
Acknowledgements
The code is a port for Fastify of envalid
.
License
Licensed under MIT.