Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by150%
Maintainers
1
Weekly downloads
 
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

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc