yrik 0fb20a58e3 提交 4 年 前
..
.vscode eec7f449c9 first commit 4 年 前
lib eec7f449c9 first commit 4 年 前
LICENSE eec7f449c9 first commit 4 年 前
README.md eec7f449c9 first commit 4 年 前
package.json 0fb20a58e3 提交 4 年 前
yarn.lock eec7f449c9 first commit 4 年 前

README.md

microargs node version Build Status npm version

CLI arguments micro parser. Only 38 lines of code, no dependencies.

#!/usr/bin/env node
const args = require('microargs')(process.argv.slice(2));
console.dir(args);

``` $ script.js -a --foo=bar --boo abc def {

params: ['abc', 'def'],
options: { a: true, foo: 'bar', boo: true }

}