npm.io
1.1.3 • Published 7 years ago

@pawelgalazka/cli-args

Licence
MIT
Version
1.1.3
Deps
0
Size
175 kB
Vulns
0
Weekly
0
Stars
2
DeprecatedThis package is deprecated

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('@pawelgalazka/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 }
}

Keywords