1.0.0-beta.0 • Published 4 years ago

env-var-checker v1.0.0-beta.0

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

env-var-checker (WIP)

NPM version NPM downloads NPM license All Contributors Codecov Travis Bundle size

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' /* , more env variables */]);

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

1.0.0-beta.0

4 years ago

0.0.0

4 years ago