@nuff-said/args

1.0.0 • Public • Published

@nuff-said/args

A compact and efficient CLI argument parser that supports all major argument formats, all packed into a minzipped code size of just 325 bytes! 4x smaller than the most popular option, minimist.

const parseArgs = require('@nuff-said/args');
console.log(parseArgs(process.argv.slice(2)));
$ node index bool=false --num 123 -ar -z false --no-test hey hey -e2e3 -x= -- --no -more -parse=ing
{
  flags: { test: false, num: 123, x: '', z: false, a: true, r: true, e: 2000 },
  _: [ 'bool=false', 'hey', 'hey' ],
  extras: [ '--no', '-more', '-parse=ing' ]
}

Installation

$ npm i @nuff-said/args

Contributing

All contributions are welcome! Feel free to file an issue, point out an optimization or even push a PR!

License

This project uses the GPL-3.0 license.

Readme

Keywords

Package Sidebar

Install

npm i @nuff-said/args

Weekly Downloads

0

Version

1.0.0

License

GPL-3.0

Unpacked Size

2.25 kB

Total Files

3

Last publish

Collaborators

  • siddharthshyniben