require-environment-variables

2.0.0 • Public • Published

require-environment-variables TypeScript

Install

npm

npm install require-environment-variables --save

yarn

yarn add require-environment-variables

Usage

js

const requireEnv = require("require-environment-variables");
requireEnv(['GOOGLEANALYTICSID', 'SSLKEY', 'SSLCERT', 'SSLCA']);

ts

import requireEnv from 'require-environment-variables'
requireEnv(['GOOGLEANALYTICSID', 'SSLKEY', 'SSLCERT', 'SSLCA']);

If any of the environment variables(process.env.GOOGLEANALYTICSID) don't exist, the process exits with code 400

Contribute

Update and add tests to tests/**/*.spec.ts
Pull requests will verify that tests pass

Package Sidebar

Install

npm i require-environment-variables

Weekly Downloads

876

Version

2.0.0

License

MIT

Unpacked Size

2.92 kB

Total Files

3

Last publish

Collaborators

  • ~jcblw
  • etanlubeck
  • bjoshuanoah