Skip to content

Commit

Permalink
[readme] add description of --no
Browse files Browse the repository at this point in the history
Also, remove old security warning.

Fixes: minimistjs#38
  • Loading branch information
shadowspawn authored and ljharb committed Oct 12, 2023
1 parent cfb8d4b commit dc69694
Showing 1 changed file with 5 additions and 12 deletions.
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)

# 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

0 comments on commit dc69694

Please sign in to comment.