node-env-manager
v1.1.1
Published
Operating on the NODE_ENV environmental variable
Downloads
22
Maintainers
Readme
NODE-ENV Manager
Operating on the NODE_ENV environmental variable
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();