Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

etc

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

etc - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

15

etc.js

@@ -26,14 +26,7 @@ var util = require('util');

var conf = this.deepSnapshot;
var parts = key.split(this.delim);
if (typeof key === 'undefined') return conf;
parts.forEach(function(part) {
if (conf[part]) {
conf = conf[part];
}
else {
return undefined;
}
});
return conf;
return key.split(this.delim).reduce(function(prev, part) {
return typeof prev[part] !== 'undefined' ? prev[part] : undefined;
}, conf);
};

@@ -40,0 +33,0 @@

{
"name": "etc",
"version": "0.0.7",
"version": "0.0.8",
"description": "Configuration loader for node.js applications",

@@ -5,0 +5,0 @@ "main": "etc.js",

@@ -52,2 +52,6 @@ var etc = require('../'),

it('made-up key returns undefined', function() {
conf.set('foo', 'bar');
assert.strictEqual(conf.get('blah'), undefined);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc