🚀 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.0.7

4

lib/env.js

@@ -77,4 +77,4 @@ var fs = require('fs');

function add_dot_env_line_to_json (json, env_variable) {
var environment_parts = env_variable.replace('export','').split('=').map(trim);
json[environment_parts[0]] = environment_parts[1];
var environment_parts = env_variable.replace('export','').split('=');
json[environment_parts[0].trim()] = environment_parts.slice(1).join('=').trim();
return json;

@@ -81,0 +81,0 @@ }

{
"name": "env2",
"version": "2.0.6",
"version": "2.0.7",
"description": "Environment Variable Loader",

@@ -5,0 +5,0 @@ "keywords": [

@@ -86,2 +86,8 @@ var test = require('tape');

test("A .env file with equals in the variable value works", function (t) {
require('../lib/env')(dotenv);
t.equal(process.env.KEY_WITH_EQUALS, 'http://foo.bar/?baz=quux', 'values with "=" work!');
t.end();
});
test("An .env file with spaces in the definition should work", function (t) {

@@ -88,0 +94,0 @@ var new_env = fs.createWriteStream(newenv);

Sorry, the diff of this file is not supported yet