Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unknown flag values to be passed in explicitly #13

Merged
merged 6 commits into from
Oct 27, 2022
Prev Previous commit
docs: explicit unknown flag
  • Loading branch information
privatenumber committed Oct 27, 2022
commit bd9eeed010219aab099dc9cf1bfef2cb02c6092b
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ $ node ./cli --someString hello --some-string world
```

### Unknown flags
When unrecognized flags are passed in, they are either interpreted as a string or boolean depending on usage. Unknown flags are not converted to camelCase to allow for accurate error handling.
When unrecognized flags are passed in, they are interpreted as a boolean, or a string if explicitly passed in. Unknown flags are not converted to camelCase to allow for accurate error handling.

```sh
$ node ./cli --unknown-flag --unknown-flag 2
$ node ./cli --unknown-flag --unknown-flag=2
```

This outputs the following:
Expand Down