Zhenwei Jin
Zhenwei Jin
/cc @aduh95 @jasnell
can you please take a look @aduh95
> IMO there should be a flag, something like `allowNegativeArguments` in the options (My name probably needs some work). Someone may be be parsing a `--no-` prefixed argument for the...
> Turning this on by default would be a breaking change. Might make more sense to make it opt-in per option, as in `{ 'foo': { type: 'boolean', allowNegation: true...
> I don't think it should be set to the opposite of the default value, but to `false`. Thanks for the reminder. I have misunderstanding it before and thought --no-...
> I was thinking about that too. The example in the docs support `--no-*` for a `"string"` option too, so is doing something different and not completely obsoleted by `allowNegative`....
> For interest, I was wondering about a short option for negation, and current state of PR does allow this: > > ``` > const parsedArgs = parseArgs({ > allowNegative:...
> There are some other example uses for tokens on the `parseArg` repo. Perhaps blocking repeated options? > > * https://github.com/pkgjs/parseargs/blob/main/examples/no-repeated-options.js I have added some checks in `storeOption ` to...
> If landing this, it would be good to also update [the docs](https://nodejs.org/docs/latest/api/util.html#parseargs-tokens) which use this precise case as an example of the tokens array: > > > For example...