Comparing version 0.0.1 to 0.0.2
@@ -25,3 +25,3 @@ /*! | ||
this.envfile = path.join(process.cwd(), envfile || 'env.json') | ||
this.evars = require(this.envfile) || {} | ||
this.evars = (path.existsSync(this.envfile)) ? require(this.envfile) : {} | ||
this.id = process.env['ENV_ID'] | ||
@@ -28,0 +28,0 @@ } |
{ | ||
"name": "env" | ||
, "version": "0.0.1" | ||
, "version": "0.0.2" | ||
, "description": "Environment variable manager" | ||
@@ -5,0 +5,0 @@ , "keywords": ["process", "environment", "env"] |
@@ -6,7 +6,3 @@ var Env = require('..') | ||
console.log(Env, env) | ||
test('env core', function (t) { | ||
t.plan(6) | ||
t.ok(Env.version) | ||
@@ -89,1 +85,11 @@ t.ok(env.ok) | ||
}) | ||
test('env with no env.json', function (t) { | ||
var env3 = require('..')() | ||
t.ok(env3.evars) | ||
t.isa(env3.evars, 'object') | ||
t.deepEqual(env3.evars, {}) | ||
t.deepEqual(env3.get(), {}) | ||
t.end() | ||
}) |
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
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
211
27701