This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

gar

1.0.4 • Public • Published

gar

The lightweight Node arguments parser

GitHub | NPM

Install

npm i gar

Use

gar usage demo

const args = require('gar')(process.argv.slice(2))
 
console.log(args)

So for: -h hey --toggle -ac --hey=hi -spaced "hey there" -num 1 lone

{
    "h": "hey",
    "toggle": true,
    "a": true,
    "c": true,
    "hey": "hi",
    "spaced": "hey there",
    "num": 1,
    "_": ["lone"]
}

Why use gar?

gar is way more lightweight than other argument parsing packages.

Here's a size comparison table:

Package Size
optimist optimist package size
minimist minimist package size
args-parser args-parser package size
gar gar package size

Package Sidebar

Install

npm i gar

Weekly Downloads

57,490

Version

1.0.4

License

MIT

Unpacked Size

4.4 kB

Total Files

4

Last publish

Collaborators

  • ethan_