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

config-load

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

config-load - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

4

changelog.md

@@ -6,1 +6,5 @@ # Changelog

* Initial release
## 0.1.1
* `null` selectors

@@ -33,3 +33,7 @@ // --------------------

_.forIn(selectors, function(value, name) {
if (config[name] && config[name][value] !== undefined) _.merge(config, config[name][value]);
var selector = config[name];
if (value !== null) selector = (selector || {})[value];
if (selector !== undefined) _.merge(config, selector);
delete config[name];

@@ -36,0 +40,0 @@ });

2

package.json
{
"name": "config-load",
"version": "0.1.0",
"version": "0.1.1",
"description": "Load config from a tree of JS/JSON files",

@@ -5,0 +5,0 @@ "main": "./lib/",

@@ -92,2 +92,29 @@ # config-load.js

##### `null` value
If a `selector`'s value is `null`, it takes the `name` key only.
If config file parsing produces:
```js
{
url: 'http://example.com/',
local: {
url: 'http://mysite.com/'
}
}
```
```js
configLoad(path, { selectors: { local: null } } )
```
returns:
```js
{
url: 'http://mysite.com/'
}
```
## Tests

@@ -94,0 +121,0 @@

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