1.0.0 • Published 6 years ago

check-env-return-val v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Check Env Return Val

check your env variables and return your checked env values. If all your env values passed, then it will return your checked env values. Otherwise, it will throw an error of a undefined variable or variables.

Usage

at your nodejs application : npm i check-env-return-val

use it:

// config.js
const checkEnvReturnVal = require('check-env-return-val')

// your env values that will use in your nodejs application.
// return: it will return checked object that include your env values, which will be easily deconstruct.
// like: {"REGION" : "CHINA", "ACCESS_KEY_ID": "special id", "ACCESS_KEY_SECRET": "strong secret"}
const checkedEnvsObj = checkEnvReturnVal(['REGION',"ACCESS_KEY_ID","ACCESS_KEY_SECRET"])

module.exports = checkedEnvsObj

License

MIT

1.0.0

6 years ago