lil-env-thing
A tiny convenience module for managing process.env.NODE_ENV
Installation
This uses ES6 classes with getter methods, so node >=4 is required.
npm install lil-env-thing --save
Usage
const env = // Assuming process.env.NODE_ENV is undefined: envtest // falseenvdevelopment // falseenvproduction // falseenvcurrent // undefined processenvNODE_ENV = 'test' envtest // trueenvdevelopment // falseenvproduction // falseenvcurrent // 'test'
Tests
npm installnpm test
Dependencies
None
Dev Dependencies
- chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
- mocha: simple, flexible, fun test framework
License
MIT
Generated by package-json-to-readme