Comparing version 0.0.3 to 0.0.4
@@ -22,2 +22,3 @@ "use strict"; | ||
var lines = content.split('\n'); | ||
var lines = lines.filter(function(n) { return n; }); // remove any empty lines | ||
@@ -24,0 +25,0 @@ for (var i=0; i<lines.length; i++) { |
{ | ||
"name": "dotenv", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Loads environment variables from .env", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -5,2 +5,8 @@ # dotenv | ||
> "Storing [configuration in the environment](http://www.12factor.net/config) is one of the tenets of a [twelve-factor app](http://www.12factor.net/). Anything that is likely to change between deployment environments–such as resource handles for databases or credentials for external services–should be extracted from the code into environment variables. | ||
> | ||
> But it is not always practical to set environment variables on development machines or continuous integration servers where multiple projects are run. Dotenv load variables from a `.env` file into ENV when the environment is bootstrapped." | ||
> | ||
> [Brandon Keepers' Dotenv in Ruby](https://github.com/bkeepers/dotenv) | ||
## Installation | ||
@@ -7,0 +13,0 @@ |
@@ -13,3 +13,3 @@ var assert = require('assert'), | ||
it('version should be set', function() { | ||
result.version.should.eql("0.0.3"); | ||
result.version.should.eql("0.0.4"); | ||
}); | ||
@@ -29,5 +29,7 @@ | ||
}); | ||
it('sets single quotes environment variables', function() { | ||
process.env.SINGLE_QUOTES.should.eql("single_quotes"); | ||
}); | ||
it('expands newlines but only if double quoted', function() { | ||
@@ -38,3 +40,11 @@ process.env.EXPAND_NEWLINES.should.eql("expand\nnewlines"); | ||
}); | ||
it('reads from .env.development', function() { | ||
process.env.FROM_DEVELOPMENT_ENV.should.eql("from_development_env"); | ||
}); | ||
it('reads from a skipped line in .env.development', function() { | ||
process.env.AFTER_LINE.should.eql("after_line"); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5590
7
79
56
11