1.1.0 • Published 4 years ago

@ansaro/validate-env v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

validate-env CircleCI codecov

Validate environment variables in Node.js

require("@ansaro/validate-env")(["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY"])

Pass an array of strings you want to make sure exist in process.env. An error will be thrown listing any that are missing unless process.env.NODE_ENV is set to test. This allows you to easily test your code without needing to mock or stub this module.

1.1.0

4 years ago

1.0.0

5 years ago