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

readme: add description of --no behaviour #48

Merged
1 commit merged into from
Mar 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $ node example/parse.js -a beep -b boop
```

```
$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop --no-ding foo bar baz
{
_: ['foo', 'bar', 'baz'],
x: 3,
Expand All @@ -34,20 +34,11 @@ $ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
a: true,
b: true,
c: true,
beep: 'boop'
beep: 'boop',
ding: false
}
```

# security

Previous versions had a prototype pollution bug that could cause privilege
escalation in some circumstances when handling untrusted user input.

Please use version 1.2.6 or later:

* https://security.snyk.io/vuln/SNYK-JS-MINIMIST-2429795 (version <=1.2.5)
* https://snyk.io/vuln/SNYK-JS-MINIMIST-559764 (version <=1.2.3)

shadowspawn marked this conversation as resolved.
Show resolved Hide resolved
# methods

``` js
Expand All @@ -65,6 +56,8 @@ Numeric-looking arguments will be returned as numbers unless `opts.string` or
`opts.boolean` contains that argument name. To disable numeric conversion
for non-option arguments, add `'_'` to `opts.string`.

A negated argument of the form `--no-foo` returns `false` for option `foo`.

Any arguments after `'--'` will not be parsed and will end up in `argv._`.

options can be:
Expand Down
Loading