🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

env2

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

env2 - npm Package Compare versions

Comparing version

to
2.1.0

6

lib/env.js

@@ -31,3 +31,3 @@ var fs = require('fs');

}
var env_getter = filepath.indexOf('.env') !== -1 ? get_dot_env : require;
var env_getter = filepath.indexOf('.env') !== -1 ? get_dot_env : get_JSON;
var env = env_getter(filepath);

@@ -81,2 +81,6 @@ Object.keys(env).forEach(function(k) {

function get_JSON (path) {
return JSON.parse(fs.readFileSync(path))
}
function add_dot_env_line_to_json (json, env_variable) {

@@ -83,0 +87,0 @@ var environment_parts = env_variable.replace('export','').split('=');

6

package.json
{
"name": "env2",
"version": "2.0.8",
"version": "2.1.0",
"description": "Environment Variable Loader",

@@ -12,3 +12,5 @@ "keywords": [

"aws",
"lambda"
"lambda",
"webpack",
"universal"
],

@@ -15,0 +17,0 @@ "author": "Nelson <contact.nelsonic@gmail.com> (http://www.dwyl.io)",

@@ -32,2 +32,11 @@ env2 - environment variable loader

Works fine with build systems
+like [webpack][webpack] and [browserify][browserify].
+If you want to use it on the frontend,
+you will need some sort of [filesystem shim][brfs]
+
+[webpack]: https://webpack.github.io/
+[browserify]: http://browserify.org/
+[brfs]: https://github.com/substack/brfs
## How?

@@ -34,0 +43,0 @@