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

clap

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clap - npm Package Compare versions

Comparing version 1.1.3 to 1.2.0

4

HISTORY.md

@@ -0,1 +1,5 @@

## 1.2.0 (June 13, 2017)
- Improved multi value option processing (@smelukov, #7)
## 1.1.3 (March 16, 2017)

@@ -2,0 +6,0 @@

30

index.js

@@ -303,2 +303,5 @@ var MAX_LINE_WIDTH = process.stdout.columns || 200;

throw new SyntaxError('Option ' + token + ' should be used with at least ' + option.minArgsCount + ' argument(s)\nUsage: ' + option.usage);
if (option.maxArgsCount == 1)
params = params[0];
}

@@ -593,5 +596,4 @@ else

var option = this.options[name];
var newValue = Array.isArray(value)
? option.normalize.apply(this, value)
: option.normalize.call(this, value);
var oldValue = this.values[name];
var newValue = option.normalize.call(this, value, oldValue);

@@ -724,9 +726,6 @@ this.values[name] = option.maxArgsCount ? newValue : value;

// apply beforeInit options
command.setOptions(
item.options.reduce(function(res, entry){
if (entry.option.beforeInit)
res[entry.option.camelName] = entry.value;
return res;
}, {})
);
item.options.forEach(function(entry){
if (entry.option.beforeInit)
command.setOption(entry.option.camelName, entry.value);
});

@@ -739,9 +738,6 @@ command.init_(item.args);

// apply regular options
command.setOptions(
item.options.reduce(function(res, entry){
if (!entry.option.beforeInit)
res[entry.option.camelName] = entry.value;
return res;
}, {})
);
item.options.forEach(function(entry){
if (!entry.option.beforeInit)
command.setOption(entry.option.camelName, entry.value);
});

@@ -748,0 +744,0 @@ prevCommand = command;

@@ -7,3 +7,3 @@ {

"license": "MIT",
"version": "1.1.3",
"version": "1.2.0",
"keywords": [

@@ -10,0 +10,0 @@ "cli",

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