Comparing version 2.0.4 to 2.0.5
{ | ||
"name": "getopts", | ||
"description": "Node.js CLI options parser.", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -22,3 +22,3 @@ # Getopts | ||
<pre> | ||
$ <a href="./example/demo">example/demo</a> --super=sonic -xU9000 -- game over | ||
$ <a href="./example/demo">example/demo</a> --super=sonic -xu9000 -- game over | ||
</pre> | ||
@@ -32,3 +32,3 @@ | ||
s: "super", | ||
U: "ultra" | ||
u: "ultra" | ||
}, | ||
@@ -43,3 +43,3 @@ default: { | ||
```jsx | ||
```js | ||
{ | ||
@@ -49,3 +49,3 @@ _: ["game", "over"], | ||
s: "sonic", | ||
U: "9000", | ||
u: "9000", | ||
super: "sonic", | ||
@@ -72,5 +72,5 @@ ultra: "9000", | ||
```js | ||
getopts(["-U"], { | ||
getopts(["-u"], { | ||
alias: { | ||
U: ["u", "ultra"] | ||
u: ["U", "ultra"] | ||
} | ||
@@ -82,8 +82,8 @@ }) //=> { _:[], u:true, U:true, ultra:true } | ||
An array of options that should be parsed as booleans. In the example, by indicating that `U` is a boolean option, the number `1` is parsed as an operand and not as a value. | ||
An array of options that should be parsed as booleans. In the example, by indicating that `u` is a boolean option, the number `1` is parsed as an operand and not as a value. | ||
```js | ||
getopts(["-U", 1], { | ||
boolean: ["U"] | ||
}) //=> { _:[1], U:true } | ||
getopts(["-u", 1], { | ||
boolean: ["u"] | ||
}) //=> { _:[1], u:true } | ||
``` | ||
@@ -96,7 +96,7 @@ | ||
```js | ||
getopts(["-U"], { | ||
getopts(["-u"], { | ||
default: { | ||
turbo: true | ||
} | ||
}) //=> { _:[], U:true, turbo:true } | ||
}) //=> { _:[], u:true, turbo:true } | ||
``` | ||
@@ -103,0 +103,0 @@ |
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
8109