Comparing version 2.2.0 to 2.2.1
{ | ||
"name": "getopts", | ||
"description": "Node.js CLI options parser.", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "types": "getopts.d.ts", |
@@ -9,3 +9,3 @@ # Getopts | ||
Need for speed? Getopts is _10x_~_20x_ [faster](/bench) than alternatives. | ||
Need for speed? Getopts is the [fastest](#benchmark-results) CLI parser for Node.js | ||
@@ -25,3 +25,3 @@ ## Installation | ||
<pre> | ||
$ <a href="./example/demo">example/demo</a> --turbo -sw10 -- alpha beta | ||
$ <a href="./example/demo">example/demo</a> --turbo -xw10 -- alpha beta | ||
</pre> | ||
@@ -46,3 +46,3 @@ | ||
w: 10, | ||
s: true, | ||
x: true, | ||
t: true, | ||
@@ -103,7 +103,7 @@ warp: 10, | ||
```js | ||
getopts(["----", "alpha"]) //=> { _: [], --:"alpha" } | ||
getopts(["--warp=e=mc^2"]) //=> { _: [], warp:"e=mc^2" } | ||
``` | ||
```js | ||
getopts(["--warp=e=mc^2"]) //=> { _: [], warp:"e=mc^2" } | ||
getopts(["----", "alpha"]) //=> { _: [], --:"alpha" } | ||
``` | ||
@@ -182,3 +182,3 @@ | ||
An object of option aliases. An alias can be a string or an array of strings. Aliases let you define alternate names for an option, e.g., the short and long variations of its name, etc. | ||
An object of option aliases. An alias can be a string or an array of strings. Aliases let you define alternate names for an option, e.g., the short and long (canonical) variations. | ||
@@ -236,4 +236,19 @@ ```js | ||
## Benchmark Results | ||
All tests run on a 2.4GHz Intel Core i7 CPU with 16 GB memory. | ||
``` | ||
npm i -C bench && node bench | ||
``` | ||
<pre> | ||
mri × 378,898 ops/sec | ||
yargs × 32,993 ops/sec | ||
<b>getopts × 1,290,267 ops/sec</b> | ||
minimist × 289,048 ops/sec | ||
</pre> | ||
## License | ||
Getopts is MIT licensed. See [LICENSE](LICENSE.md). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
14599
249
0