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

command-line-args

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

command-line-args - npm Package Compare versions

Comparing version 3.0.5 to 4.0.0-0

bin/cli.js

23

package.json
{
"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 @@ [![view on npm](http://img.shields.io/npm/v/command-line-args.svg)](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.&lt;definition&gt;](#module_definition)</code> | An array of [OptionDefinition](#exp_module_definition--OptionDefinition) objects |
| [argv] | <code>Array.&lt;string&gt;</code> | An array of strings, which if passed will be parsed instead of `process.argv`. |
| optionDefinitions | <code>[Array.&lt;definition&gt;](#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.&lt;string&gt;</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 @@

&copy; 2014-16 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown).
&copy; 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

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