mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
doc: refine util.parseArgs
default
definition
The default value is legal by means other than defaulting. PR-URL: https://github.com/nodejs/node/pull/58958 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
parent
b305119844
commit
ce4a16f50a
1 changed files with 6 additions and 4 deletions
|
@ -1955,10 +1955,12 @@ changes:
|
|||
times. If `true`, all values will be collected in an array. If
|
||||
`false`, values for the option are last-wins. **Default:** `false`.
|
||||
* `short` {string} A single character alias for the option.
|
||||
* `default` {string | boolean | string\[] | boolean\[]} The default value to
|
||||
be used if (and only if) the option does not appear in the arguments to be
|
||||
parsed. It must be of the same type as the `type` property. When `multiple`
|
||||
is `true`, it must be an array.
|
||||
* `default` {string | boolean | string\[] | boolean\[]} The value to assign to
|
||||
the option if it does not appear in the arguments to be parsed. The value
|
||||
must match the type specified by the `type` property. If `multiple` is
|
||||
`true`, it must be an array. No default value is applied when the option
|
||||
does appear in the arguments to be parsed, even if the provided value
|
||||
is falsy.
|
||||
* `strict` {boolean} Should an error be thrown when unknown arguments
|
||||
are encountered, or when arguments are passed that do not match the
|
||||
`type` configured in `options`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue