pkg-env
v1.0.2
Published
Returns an object with current NODE_ENV, package version, and several booleans about the environment
Downloads
3
Readme
Install
npm install --save pkg-env
Use
const pkgEnv = require('pkg-env');
console.log(pkgEnv);
/*
{
env: 'dev',
isDev: true,
isStaging: false,
isTest: false,
isProd: false,
version: '1.0.0'
}
*/
Thanks
This package is a simple consolidation of two packages, get-env and load-pkg, whose authors deserve all the credit!