command-line-args
Advanced tools
Comparing version
{ | ||
"name": "command-line-args", | ||
"version": "3.0.5", | ||
"version": "4.0.0-0", | ||
"description": "A library to parse command-line options.", | ||
"repository": "https://github.com/75lb/command-line-args.git", | ||
"main": "index", | ||
"bin": "bin.js", | ||
"main": "lib/command-line-args.js", | ||
"bin": "bin/cli.js", | ||
"scripts": { | ||
"test": "node test.js", | ||
"docs": "jsdoc2md -l off -t jsdoc2md/README.hbs src/lib/*.js > README.md; echo", | ||
"cover": "istanbul cover ./node_modules/.bin/test-runner src/test/*.js && cat coverage/lcov.info | ./node_modules/.bin/coveralls && rm -rf coverage; echo", | ||
"es5": "rm -rf es5 && babel --presets babel-preset-es2015 --no-comments src --out-dir es5" | ||
"test": "test-runner test/*.js", | ||
"docs": "jsdoc2md -l off -t jsdoc2md/README.hbs lib/*.js > README.md; echo", | ||
"cover": "istanbul cover ./node_modules/.bin/test-runner test/*.js && cat coverage/lcov.info | ./node_modules/.bin/coveralls && rm -rf coverage; echo" | ||
}, | ||
@@ -30,4 +29,2 @@ "keywords": [ | ||
"devDependencies": { | ||
"babel-preset-es2015": "^6.18.0", | ||
"core-assert": "^0.2.1", | ||
"coveralls": "^2.11.15", | ||
@@ -40,11 +37,5 @@ "jsdoc-to-markdown": "^2.0.1", | ||
"array-back": "^1.0.4", | ||
"feature-detect-es6": "^1.3.1", | ||
"find-replace": "^1.0.2", | ||
"find-replace": "^1.0.3", | ||
"typical": "^2.6.0" | ||
}, | ||
"standard": { | ||
"ignore": [ | ||
"es5" | ||
] | ||
} | ||
} |
@@ -118,3 +118,3 @@ [](https://www.npmjs.org/package/command-line-args) | ||
### commandLineArgs(definitions, [argv]) ⇒ <code>object</code> ⏏ | ||
### commandLineArgs(optionDefinitions, [options]) ⇒ <code>object</code> ⏏ | ||
Returns an object containing all options set on the command line. By default it parses the global [`process.argv`](https://nodejs.org/api/process.html#process_process_argv) array. | ||
@@ -125,3 +125,3 @@ | ||
- `UNKNOWN_OPTION` if the user sets an option without a definition | ||
- `UNKNOWN_OPTION` if `options.partial` is false and the user set an option without a definition | ||
- `NAME_MISSING` if an option definition is missing the required `name` property | ||
@@ -137,4 +137,6 @@ - `INVALID_TYPE` if an option definition has a `type` value that's not a function | ||
| --- | --- | --- | | ||
| definitions | <code>[Array.<definition>](#module_definition)</code> | An array of [OptionDefinition](#exp_module_definition--OptionDefinition) objects | | ||
| [argv] | <code>Array.<string></code> | An array of strings, which if passed will be parsed instead of `process.argv`. | | ||
| optionDefinitions | <code>[Array.<definition>](#module_definition)</code> | An array of [OptionDefinition](#exp_module_definition--OptionDefinition) objects | | ||
| [options] | <code>object</code> | Options. | | ||
| [options.partial] | <code>boolean</code> | If `true`, unknown and unwanted arguments are returned in the `_unknown` property. | | ||
| [options.argv] | <code>Array.<string></code> | An array of strings, which if passed will be parsed instead of `process.argv`. | | ||
@@ -230,2 +232,3 @@ **Example** | ||
**Kind**: instance property of <code>[OptionDefinition](#exp_module_definition--OptionDefinition)</code> | ||
**Default**: <code>String</code> | ||
<a name="module_definition--OptionDefinition.OptionDefinition+alias"></a> | ||
@@ -373,2 +376,2 @@ | ||
© 2014-16 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown). | ||
© 2014-17 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3
-25%4
-33.33%373
0.81%5
-28.57%75287
-29.64%49
-33.78%1739
-33.35%2
100%1
Infinity%- Removed
- Removed
Updated