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

node-settings

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-settings - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

Makefile

20

lib/configurator.js

@@ -30,8 +30,8 @@ (function() {

return config_loader.get(this.source.options, function(data) {
var config, env_config;
var config, env_config, result;
config = data["default"] || {};
env_config = data[_this.environment];
if (env_config) merge(config, env_config);
env_config = data[_this.environment] || {};
result = merge(config, env_config);
return process.nextTick(function() {
return callback(config);
return callback(result);
});

@@ -42,9 +42,9 @@ });

Configurator.prototype.loadSync = function() {
var config, config_loader, data, env_config;
var config, config_loader, data, env_config, result;
config_loader = Configurator.config_sources[this.source.name];
data = config_loader.getSync(this.source.options);
config = data["default"] || {};
env_config = data[this.environment];
if (env_config) merge(config, env_config);
return config;
env_config = data[this.environment] || {};
result = merge(config, env_config);
return result;
};

@@ -60,5 +60,5 @@

return fs.readFile(options.location, options.encoding || 'ascii', function(err, data) {
if (err) throw err;
return process.nextTick(function() {
return callback(JSON.parse(data));
if (!err) callback(null, JSON.parse(data));
if (err) return callback(err, null);
});

@@ -65,0 +65,0 @@ });

@@ -5,3 +5,3 @@ {

"description": "Provides easy, multi-environment configuration",
"version": "0.1.3",
"version": "0.2.0",
"homepage": "",

@@ -21,4 +21,6 @@ "repository": {

"devDependencies": {
"jasmine-node": "latest"
"mocha" : "1.0.0",
"should" : "0.6.0",
"coffee-script" : "1.2.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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