- Notifications
You must be signed in to change notification settings - Fork2
ethan7g/gar
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The lightweight Node arguments parser
npm i gar
constargs=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"]}
gar is way more lightweight than other argument parsing packages.
Here's a size comparison table:
Package | Size |
---|---|
optimist | |
minimist | |
args-parser | |
gar |