nopt
nopt copied to clipboard
Node/npm Option Parsing
Original issue: https://github.com/ember-cli/ember-cli/issues/6970 Parsing options issues for a string with "options" _node test.js foo bar --options '--split 2 --random'_ Issue after: https://github.com/npm/nopt/commit/651d4473946096d341a480bbe56793de3fc706aa. https://regex101.com/r/aoa7GZ/1 Example test.js: ```js var nopt = require("nopt")...
The purpose of "--no-myParam" is to allow setting a parameter to null instead of undefined, because "-myParam null" would set it to the string value 'null' instead of the javascript...
Boolean options should not swallow the following argument if it is `false` or `true`. This can occur coincidentally and is probably not what the user wants. Consider a CLI tool...
I can't validate type `[String,Array]` It should work with `validate()`, but that function is not exposed.
Please consider this minimal example: ``` bash node
Currently (v3.0.1), nopt invariably accepts unknown options and simply adds them to the object returned. However, a typical use case for a CLI is to _abort_ processing in case an...
As of v3.0.1, `README.md` states: > By default, nopt outputs a warning to standard error when invalid options are found. Note that 'invalid option' refers to an invalid _value_ specified...
See https://github.com/donaldpipowitch/atom-beautify/issues/16#issuecomment-45970609
I've noticed a behavior change from [email protected] -> [email protected] with the parsing of unexpected arguments. - In [email protected] '-a a' and '-a=a' (as well as with `--`) were equivalent. -...
Is that possible ? ``` var opts = { "bloo" : [0, 1, 2] }; ``` It seems `--bloo 1` isn't accepted when i do that.