env-var-checker

Check if required env variables are set

Usage no npm install needed!

<script type="module">
  import envVarChecker from 'https://cdn.skypack.dev/env-var-checker';
</script>

README

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):


Jakub Biesiada

đŸ’ģ ⚠ī¸ 📖

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