lil-env-thing
v1.0.0
Published
A tiny convenience module for managing process.env.NODE_ENV
Downloads
221
Maintainers
Readme
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 = require('lil-env-thing')
// Assuming process.env.NODE_ENV is undefined:
env.test // false
env.development // false
env.production // false
env.current // undefined
process.env.NODE_ENV = 'test'
env.test // true
env.development // false
env.production // false
env.current // 'test'
Tests
npm install
npm 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