You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
doublekou 4fddd39d76 更新 1 year ago
..
.vscode 更新 1 year ago
lib 更新 1 year ago
LICENSE 更新 1 year ago
README.md 更新 1 year ago
package.json 更新 1 year ago
yarn.lock 更新 1 year ago

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 }
}