1.1.3 • Published 1 year ago

@yun-jie/cli-args v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

cli-args node version Build Status npm version

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

#!/usr/bin/env node
const args = require('@yun-jie/cli-args')(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 }
}
1.1.3

1 year ago