1.0.0 • Published 8 years ago

lil-env-thing v1.0.0

Weekly downloads
312
License
MIT
Repository
github
Last release
8 years ago

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