Skip to content

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

@mklement0

Description

@mklement0

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions