This package has been deprecated

Author message:

Migrated to @jf/node-env-tools

node-env-tools

1.1.0 • Public • Published

node-env-tools stable

npm install node-env-tools

Tools for working with process.env.

Examples

const net = require('node-env-tools');

// Use value instead of process.env. 
console.log(net.load({ ... }));

// Get key if exists, nested objects is allowed. 
console.log(net.get('a.b.c'));

// Check if key exists, nested objects is allowed.
console.log(net.has('a.b.c'));

// Set value.
console.log(net.set('NODE_ENV', 'testing'));

// Check if NODE_ENV is 'production' or '"production"'
console.log(net.isEnv('production'));

// Check if NODE_ENV is 'production'
console.log(net.isEnv('production', false));

// Check if NODE_ENV is 'dev', '"dev"', 'development' or '"development"'
console.log(net.isDev());

// Check if NODE_ENV is 'pro', '"pro"', 'production' or '"production"'
console.log(net.isPro());

// Check if NODE_ENV is 'test', '"test"', 'testing' or '"testing"'
console.log(net.isTest());

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i node-env-tools

    Weekly Downloads

    0

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    6.06 kB

    Total Files

    4

    Last publish

    Collaborators

    • joaquinfq