About ℹ️
Check if required env variables are set
Alternatives
How to Install 💾
First, install the library in your project by npm:
$ npm install env-var-checker
Or Yarn:
$ yarn add env-var-checker
Getting Started 🏁
Function
Connect libary to project:
import { envVarChecker } from 'env-var-checker';
Next use library:
envVarChecker(['MY_ENV_1', 'MY_ENV_2' ]);
Example
if (envVarChecker(['MY_ENV_1'])) {
console.log(`MY_ENV_1 is ${process.env.MY_ENV_1}`);
}
CLI
$ env-var-checker [variables...]
variables must be separated by spaces
Instead of env-var-checker
you can use aliases: env-checker
, check-env
& evc
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
License 🔱
This project is licensed under the MIT License © 2020-present Jakub Biesiada