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 came up here, but I wanted to split it out to track it explicitly.
I think that reporting the indexes of arguments within args would be a helpful addition, because it lets you build a bunch of more complicated logic on top of parseArgs without needing to do a full re-parse.
For example, this would make it straightforward to:
resolve conflicts between --foo and --no-foo as last-wins
throw on duplicate flags (check if the flag occurs at multiple indexes)
This came up here, but I wanted to split it out to track it explicitly.
I think that reporting the indexes of arguments within
argswould be a helpful addition, because it lets you build a bunch of more complicated logic on top ofparseArgswithout needing to do a full re-parse.For example, this would make it straightforward to:
--fooand--no-fooas last-wins--foo=barrather than--foo bar(check each to see ifargs[index].includes('='))--enable-experimental-optionsbefore--some-unstable-option, e.g.)