use directories for structure
This commit is contained in:
32
node_modules/minimist/readme.markdown
generated
vendored
32
node_modules/minimist/readme.markdown
generated
vendored
@@ -5,15 +5,11 @@ parse argument options
|
||||
This module is the guts of optimist's argument parser without all the
|
||||
fanciful decoration.
|
||||
|
||||
[](http://ci.testling.com/substack/minimist)
|
||||
|
||||
[](http://travis-ci.org/substack/minimist)
|
||||
|
||||
# example
|
||||
|
||||
``` js
|
||||
var argv = require('minimist')(process.argv.slice(2));
|
||||
console.dir(argv);
|
||||
console.log(argv);
|
||||
```
|
||||
|
||||
```
|
||||
@@ -33,6 +29,13 @@ $ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
|
||||
beep: 'boop' }
|
||||
```
|
||||
|
||||
# security
|
||||
|
||||
Previous versions had a prototype pollution bug that could cause privilege
|
||||
escalation in some circumstances when handling untrusted user input.
|
||||
|
||||
Please use version 1.2.3 or later: https://snyk.io/vuln/SNYK-JS-MINIMIST-559764
|
||||
|
||||
# methods
|
||||
|
||||
``` js
|
||||
@@ -65,19 +68,20 @@ argument names to use as aliases
|
||||
first non-option
|
||||
* `opts['--']` - when true, populate `argv._` with everything before the `--`
|
||||
and `argv['--']` with everything after the `--`. Here's an example:
|
||||
|
||||
```
|
||||
> require('./')('one two three -- four five --six'.split(' '), { '--': true })
|
||||
{ _: [ 'one', 'two', 'three' ],
|
||||
'--': [ 'four', 'five', '--six' ] }
|
||||
```
|
||||
|
||||
Note that with `opts['--']` set, parsing for arguments still stops after the
|
||||
`--`.
|
||||
|
||||
* `opts.unknown` - a function which is invoked with a command line parameter not
|
||||
defined in the `opts` configuration object. If the function returns `false`, the
|
||||
unknown option is not added to `argv`.
|
||||
|
||||
```
|
||||
> require('./')('one two three -- four five --six'.split(' '), { '--': true })
|
||||
{ _: [ 'one', 'two', 'three' ],
|
||||
'--': [ 'four', 'five', '--six' ] }
|
||||
```
|
||||
|
||||
Note that with `opts['--']` set, parsing for arguments still stops after the
|
||||
`--`.
|
||||
|
||||
# install
|
||||
|
||||
With [npm](https://npmjs.org) do:
|
||||
|
Reference in New Issue
Block a user