tiny-opts-parser
Advanced tools
Comparing version
{ | ||
"name": "tiny-opts-parser", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "A tiny options parser.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
An extremely lightweight CLI options parser. | ||
Install via npm or yarn | ||
```console | ||
> npm install --save tiny-opts-parser | ||
``` | ||
And then just use `import` (or `require` if you need to): | ||
```js | ||
import parser from 'tiny-opts-parser'; | ||
``` | ||
In node, command line input is passed to application as an array. Tiny Opts Parser takes this array as its first argument, and an options object as its (optional) second argument. Tiny Opts Parser returns an object that maps the name of each argument or option to its value. The output will be exactly the same as the output of all the popular JS CLI parsers like Commander, Minimist, and Yargs. | ||
@@ -4,0 +16,0 @@ |
60751
0.31%28
75%