You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR introduces a strict mode parser config that is enabled by default.
Errors on:
- Unknown option encountered
- Option of type:'string' used like a boolean option e.g. lone --string
- Option of type:'boolean' used like a string option e.g. --boolean=foo
*`type` {'string'|'boolean'} (Required) Type of known option
85
85
*`multiple` {boolean} (Optional) If true, when appearing one or more times in `args`, results are collected in an `Array`
86
86
*`short` {string} (Optional) A single character alias for an option; When appearing one or more times in `args`; Respects the `multiple` configuration
87
-
*`strict` {Boolean} (Optional) A `Boolean`on wheather or not to throw an error when unknown args are encountered
87
+
*`strict` {Boolean} (Optional) A `Boolean`for whether or not to throw an error when unknown options are encountered, `type:'string'` options are missing an options-argument, or `type:'boolean'` options are passed an options-argument; defaults to `true`
88
88
* Returns: {Object} An object having properties:
89
89
*`values` {Object}, key:value for each option found. Value is a string for string options, or `true` for boolean options, or an array (of strings or booleans) for options configured as `multiple:true`.
0 commit comments