Socket
Socket
Sign inDemoInstall

dashdash

Package Overview
Dependencies
1
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.10.1 to 1.11.0

11

lib/dashdash.js

@@ -375,3 +375,9 @@ /**

}
opts[key].push(parsedVal);
if (type.arrayFlatten && Array.isArray(parsedVal)) {
for (var i = 0; i < parsedVal.length; i++) {
opts[key].push(parsedVal[i]);
}
} else {
opts[key].push(parsedVal);
}
} else {

@@ -777,2 +783,3 @@ opts[key] = parsedVal;

* puts results in an array.
* - arrayFlatten {Boolean} Optional. XXX
* - default Optional. Default value for options of this type, if no

@@ -790,2 +797,3 @@ * default is specified in the option type usage.

assert.optionalBool(optionType.array, 'optionType.array');
assert.optionalBool(optionType.arrayFlatten, 'optionType.arrayFlatten');

@@ -797,2 +805,3 @@ optionTypes[optionType.name] = {

array: optionType.array,
arrayFlatten: optionType.arrayFlatten,
default: optionType.default

@@ -799,0 +808,0 @@ }

2

package.json
{
"name": "dashdash",
"description": "A light, featureful and explicit option parsing library.",
"version": "1.10.1",
"version": "1.11.0",
"author": "Trent Mick <trentm@gmail.com> (http://trentm.com)",

@@ -6,0 +6,0 @@ "keywords": ["option", "parser", "parsing", "cli", "command", "args"],

@@ -426,3 +426,3 @@ A light, featureful and explicit option parsing library for node.js.

Dashdash includes a good starter set of option types that it will parse for
you. However you can add your own via:
you. However, you can add your own via:

@@ -437,2 +437,4 @@ var dashdash = require('dashdash');

},
array: false, // optional
arrayFlatten: false, // optional
default: ... // optional

@@ -471,4 +473,5 @@ });

See "examples/custom-option-duration.js" for another example adding a "duration"
option type. Please let me know [on twitter](https://twitter.com/trentmick)
See "examples/custom-option-\*.js" for other examples.
See the `addOptionType` block comment in "lib/dashdash.js" for more details.
Please let me know [on twitter](https://twitter.com/trentmick)
or [with an issue](https://github.com/trentm/node-dashdash/issues/new) if you

@@ -475,0 +478,0 @@ write a generally useful one.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc