Socket
Book a DemoInstallSign in
Socket

envisor

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

envisor

Universal library for managing your environment variables

0.1.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

envisor

npm version badge Build Status License

Universal library for managing your environment variables

Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer.
They are part of the environment in which a process runs

License

MIT

Installation:

npm install envisor --save-dev

Usage

For example you could use the following code:

var env = require('envisor');

env.set('foo', 1);
env.get('foo'); // 1

API

.set

Sets/retrieves an environment variable

Primitive values

var env = require('envisor');

env.set('foo', 1);
env.get('foo'); // 1

Object values

var env = require('envisor');

env.set('foo', { bar: 1});
env.get('foo).bar; // 1

Object key/values

var env = require('envisor');

env.set({ foo: 1 });
env.get('foo'); // 1

.has

Checks an environment variable

var env = require('envisor');

env.set('foo', 1);
env.has('foo'); // true

.use

Use you personal namespace

var env = require('envisor');

env.use('foo');
env.set('bar', 1);
env.get('foo'); // 1
process.env.foo_bar; // 1

.remove

Removes an environment variable

var env = require('envisor');

env.set('foo', 1);
env.remove('foo');
env.get('foo'); // ''

.all

Returns all environment variables

var env = require('envisor');

env.all(); // process.env

Tests

npm test

Environment variables
process.env

Task submitted by Alexander Abashkin

Keywords

env

FAQs

Package last updated on 05 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.