Comparing version 0.0.1 to 0.0.2
@@ -24,3 +24,3 @@ | ||
config = typeof config === 'string' ? read(config) : config; | ||
return new Config(config); | ||
return Object.freeze(new Config(config)); | ||
}; | ||
@@ -50,2 +50,3 @@ | ||
function copy(obj) { | ||
if (!obj) return; | ||
var target = {}; | ||
@@ -69,3 +70,5 @@ Object.keys(obj).forEach(function(key) { | ||
Object.keys(b).forEach(function(key) { | ||
if (!a[key]) a[key] = b[key]; | ||
if (!a[key]) { | ||
a[key] = b[key]; | ||
} | ||
}); | ||
@@ -82,3 +85,3 @@ return a; | ||
/** | ||
* Constructor. | ||
* Config constructor. | ||
* | ||
@@ -99,3 +102,5 @@ * @param {Object} | ||
if (common) extend(settings, common); | ||
if (common) { | ||
extend(settings, common); | ||
} | ||
@@ -111,7 +116,5 @@ Object.defineProperty(this, 'env', extend({ | ||
}, descriptors)); | ||
}, this); | ||
return Object.freeze(this); | ||
}, this); | ||
} | ||
@@ -5,3 +5,3 @@ { | ||
"description": "stupid simple environment aware configuration", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -9,2 +9,9 @@ [![Build Status](https://secure.travis-ci.org/gjohnson/envcfg.png?branch=master)](http://travis-ci.org/gjohnson/envcfg) | ||
## Install | ||
***** | ||
```shell | ||
npm install envcfg | ||
``` | ||
## Usage | ||
@@ -11,0 +18,0 @@ ***** |
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
7451
11
178
134