microargs

CLI arguments micro parser

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
microargs
201.1.25 years ago6 years agoMinified + gzip package size for microargs in KB

Readme

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