Comparing version
@@ -17,3 +17,3 @@ var fs = require('fs'); | ||
if(called_by_module > -1){ | ||
filepath = path.resolve(parent_directory + filepath); | ||
filepath = path.resolve(parent_directory, filepath); | ||
} | ||
@@ -20,0 +20,0 @@ else { |
{ | ||
"name": "env2", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Environment Variable Loader", | ||
@@ -41,6 +41,6 @@ "keywords": [ | ||
"devDependencies": { | ||
"decache": "^3.0.5", | ||
"istanbul": "^0.4.3", | ||
"decache": "^3.1.0", | ||
"istanbul": "^0.4.4", | ||
"pre-commit": "^1.1.3", | ||
"tape": "^4.5.1" | ||
"tape": "^4.6.0" | ||
}, | ||
@@ -47,0 +47,0 @@ "scripts": { |
@@ -110,4 +110,4 @@ env2 - environment variable loader | ||
```javascript | ||
var env = require('env2')('./path-to-your/.env'); | ||
```js | ||
const env = require('env2')('./path-to-your/.env'); | ||
@@ -114,0 +114,0 @@ // your app goes here |
@@ -7,6 +7,7 @@ var test = require('tape'); | ||
var config = path.resolve(__dirname + '/../config.env'); | ||
require('../../lib/env.js')(config); // local | ||
// this ensures that the node_modules condition in lib/env.js is met | ||
test("Confirm that EVERYTHING=AWESOME", function(t) { | ||
delete process.env.EVERYTHING; | ||
require('../../lib/env.js')(config); // local | ||
t.ok(process.env.EVERYTHING === 'AWESOME', | ||
@@ -13,0 +14,0 @@ 'Worked! Everything is: '+process.env.EVERYTHING) |
Sorry, the diff of this file is not supported yet
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
35968
0.11%240
0.42%34
3.03%