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

dsl-config

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dsl-config - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

package.json
{
"name": "dsl-config",
"version": "2.0.0",
"version": "2.0.1",
"description": "Generate a DSL config with generators",

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

@@ -74,15 +74,18 @@ 'use strict';

// to the config
if (defaultValue) {
const clone = new DSLConfig(dslConfig);
this.config[name] = clone.config;
}
this.dsl[name] = function(callback) {
const clone = new DSLConfig(dslConfig);
this.config[name] = clone.config;
const promise = configureDsl(clone.dsl, callback);
if (isPromise(promise)) {
return promise.then(() => this.dsl);
this.dsl[name] = (function() {
let clone;
if (defaultValue) {
clone = new DSLConfig(dslConfig);
this.config[name] = clone.config;
}
return this.dsl;
};
return function(callback) {
clone = clone || new DSLConfig(dslConfig);
this.config[name] = clone.config;
const promise = configureDsl(clone.dsl, callback);
if (isPromise(promise)) {
return promise.then(() => this.dsl);
}
return this.dsl;
};
}).bind(this)();
}

@@ -89,0 +92,0 @@ return this;

@@ -335,2 +335,21 @@ 'use strict';

it('should accumulate on subsequent calls', () => {
dslConfig.configure(config => {
config
.sub1(sub1 => {
sub1
.sub1value1('value1');
})
.sub1(sub1 => {
sub1
.sub1value2('value2');
});
}).should.eql({
sub1: {
sub1value1: 'value1',
sub1value2: 'value2'
}
});
});
it('should throw if the callback throws', () => {

@@ -337,0 +356,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