node-env-manager
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

NODE-ENV Manager

Operating on the NODE_ENV environmental variable

node Travis Coveralls Known Vulnerabilities David Author license

Usage

Install

npm install node-env-manager

CONST

const { ENV } = require("node-env-manager");
 
ENV.PROD          // -> "prod",
ENV.PRODUCT       // -> "product",
ENV.PRODUCTION    // -> "production",
ENV.DEV           // -> "dev",
ENV.DEVELOP       // -> "develop",
ENV.DEVELOPMENT   // -> "development",
ENV.LOCAL         // -> "local",
ENV.TEST          // -> "test",
ENV.EXP           // -> "exp",
ENV.EXPERIENCE    // -> "experience",
ENV.GRAY          // -> "gray",
ENV.CI            // -> "ci"
ENV.REAL          // -> "real"

Mothods

const env = require("node-env-manager");
 
env.init(); // set `process.env.NODE_ENV` value if the value is null
env.get();  // get `process.env.NODE_ENV` value
env.set("prod");  // set `process.env.NODE_ENV` value
env.set(env.ENV.DEV);
 
env.isLocal();
env.isTest();
env.isDev();
env.isProd();
env.isExp();
env.isGray();
env.isCI();
env.isReal();

Package Sidebar

Install

npm i node-env-manager

Weekly Downloads

3

Version

1.1.1

License

MIT

Unpacked Size

15.1 kB

Total Files

6

Last publish

Collaborators

  • arylo