File tree 1 file changed +10
-9
lines changed
1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -65,19 +65,20 @@ argument names to use as aliases
65
65
first non-option
66
66
* ` opts['--'] ` - when true, populate ` argv._ ` with everything before the ` -- `
67
67
and ` argv['--'] ` with everything after the ` -- ` . Here's an example:
68
+
69
+ ```
70
+ > require('./')('one two three -- four five --six'.split(' '), { '--': true })
71
+ { _: [ 'one', 'two', 'three' ],
72
+ '--': [ 'four', 'five', '--six' ] }
73
+ ```
74
+
75
+ Note that with ` opts['--'] ` set, parsing for arguments still stops after the
76
+ ` -- ` .
77
+
68
78
* ` opts.unknown ` - a function which is invoked with a command line parameter not
69
79
defined in the ` opts ` configuration object. If the function returns ` false ` , the
70
80
unknown option is not added to ` argv ` .
71
81
72
- ```
73
- > require('./')('one two three -- four five --six'.split(' '), { '--': true })
74
- { _: [ 'one', 'two', 'three' ],
75
- '--': [ 'four', 'five', '--six' ] }
76
- ```
77
-
78
- Note that with ` opts['--'] ` set, parsing for arguments still stops after the
79
- ` -- ` .
80
-
81
82
# install
82
83
83
84
With [ npm] ( https://npmjs.org ) do:
You can’t perform that action at this time.
0 commit comments