nopt icon indicating copy to clipboard operation
nopt copied to clipboard

[DOCS] Read-me description inconsistent with actual handling of invalid option values

Open mklement0 opened this issue 10 years ago • 0 comments

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 for a known option in this context. I've submitted a PR to clarify this.

In practice, no such warning is printed. Nothing in nopt.js suggests that even an attempt is made to do so. As an aside, there's a remove variable that doesn't seem to do anything.

Not sure what the actual intent is, but it looks like the warning was intentionally removed and that the read-me needs to be updated accordingly, including removing the following passage, which becomes moot:

If no nopt.invalidHandler is assigned, then it will console.error its whining. If it is assigned to boolean false then the warning is suppressed.

mklement0 avatar Jan 30 '15 16:01 mklement0