aargs
v1.0.6
Published
Quick, light, easy CLI argument parser
Downloads
66
Readme
AArgs
Author: Craig Russell [email protected]
Parse command line arguments into an object e.g.
> node script.js -a -b Bzz --foo --bar=baz /path/to/file
{ '0': '/usr/bin/nodejs',
'1': '/home/user/script.js',
'2': '/path/to/file',
a: true,
b: 'Bzz',
foo: true,
bar: 'baz' }
Use it like
var args = require('argparse');
console.log(args.bar || 'default')