Comparing version
@@ -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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
35311
0.79%232
2.2%34
3.03%1
Infinity%