Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

app-env

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-env

Global environment variables for JS runtime

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

app-env

Tries to be environment variables in JS runtime, global variables really, just not on window or self object. Still be cautious, two packages using app-env, and one is dependency of another and both call env.set('url', someValue). It will change value of url for both of them, causing unexpected behaviour.

Usage

Install

$ npm i app-env

Use

import env from 'app-env';

API

env.set(key: string, value: any, [modifiable: boolean])

Sets a value for given key, can be prevented from further modification by setting modifiable to false, in which case another attempt will throw TypeError.

env.get(key: string)

Gets value of given key, same as env.KEY_NAME_HERE

Keywords

FAQs

Package last updated on 13 Nov 2017

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