New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cascading-service-config

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cascading-service-config - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

4

csc.js
var url = require('url');
module.exports = function(config, domain) {
if (!config[domain]) throw new Error(domain + ' is not a valid domain');
config = JSON.parse(JSON.stringify(config));

@@ -20,3 +18,3 @@

return config[domain];
return config[domain] || config;
};
{
"name": "cascading-service-config",
"version": "1.0.0",
"version": "1.1.0",
"description": "dry configuration for a multi-service system",

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

@@ -166,1 +166,6 @@ # Cascading Service Config

```
## `csc(configSourceObject, [domain])`
Reads a cascading service config file and returns a config for the given domain.
If the domain does not exist, the root config is returned.

@@ -46,2 +46,6 @@ var csc = require('../');

});
it('should return root config when given domain doesnt exist', function() {
var config = csc(lolconfig, 'potato');
assert.equal(config.sahti.port, 6003);
});
it('non-service root objects should also inherit service locations', function() {

@@ -48,0 +52,0 @@ var config = csc(lolconfig, 'stout');

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