fastify-envalid
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

fastify-envalid

js-standard-style CI workflow

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 exactly envalid cleanEnv
  • validators - An object that contains all the envalid validators
  • makeValidator - A function which is exactly envalid makeValidators

Acknowledgements

The code is a port for Fastify of envalid.

License

Licensed under MIT.

Package Sidebar

Install

npm i fastify-envalid

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

5.36 kB

Total Files

5

Last publish

Collaborators

  • alemagio