{"_id":"gar","_rev":"3373309","name":"gar","description":"The lightweight Node arguments parser","dist-tags":{"latest":"1.0.4"},"maintainers":[{"name":"ethan_","email":"futuristiccake@gmail.com"}],"time":{"modified":"2024-08-26T02:57:33.000Z","created":"2017-12-30T23:49:20.102Z","1.0.4":"2019-01-04T07:24:33.168Z","1.0.3":"2018-02-18T05:00:17.685Z","1.0.2":"2017-12-31T03:19:30.129Z","1.0.1":"2017-12-31T00:00:07.539Z","1.0.0":"2017-12-30T23:49:20.102Z"},"users":{},"author":{"name":"Ethan Davis"},"repository":{"type":"git","url":"git+https://github.com/ethanent/gar.git"},"versions":{"1.0.4":{"name":"gar","version":"1.0.4","description":"The lightweight Node arguments parser","main":"index.js","scripts":{"test":"echo \"Tested before deployment.\" && exit 0","test-dev":"npm install && node test.js","prepublishOnly":"npm run test-dev"},"repository":{"type":"git","url":"git+https://github.com/ethanent/gar.git"},"keywords":["argument","args","argv","parse","cli","command-line","parser","command","lightweight"],"author":{"name":"Ethan Davis"},"license":"MIT","bugs":{"url":"https://github.com/ethanent/gar/issues"},"homepage":"https://github.com/ethanent/gar#readme","devDependencies":{"whew":"^1.1.3"},"gitHead":"898a31d0dde1de12d22a3eea0af4c2017191563f","_id":"gar@1.0.4","_npmVersion":"6.4.1","_nodeVersion":"10.14.0","_npmUser":{"name":"ethan_","email":"futuristiccake@gmail.com"},"dist":{"shasum":"f777bc7db425c0572fdeb52676172ca1ae9888b8","size":2147,"noattachment":false,"key":"/gar/-/gar-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/gar/download/gar-1.0.4.tgz"},"maintainers":[{"name":"ethan_","email":"futuristiccake@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gar_1.0.4_1546586672999_0.40998278276206324"},"_hasShrinkwrap":false,"publish_time":1546586673168,"_cnpm_publish_time":1546586673168,"_cnpmcore_publish_time":"2021-12-16T20:50:33.227Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.3":{"name":"gar","version":"1.0.3","description":"The lightweight Node arguments parser","main":"index.js","scripts":{"test":"echo \"Tested before deployment.\" && exit 0","test-dev":"npm install && node test.js","prepublishOnly":"npm run test-dev"},"repository":{"type":"git","url":"git+https://github.com/ethanent/gar.git"},"keywords":["argument","args","argv","parse","cli","command-line","parser","command","lightweight"],"author":{"name":"Ethan Davis"},"license":"MIT","bugs":{"url":"https://github.com/ethanent/gar/issues"},"homepage":"https://github.com/ethanent/gar#readme","devDependencies":{"whew":"^1.1.3"},"files":["index.js","LICENSE"],"gitHead":"7fc3b2da03bb18a0a38dee1069e8f7894b7c49a5","_id":"gar@1.0.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"ethan_","email":"futuristiccake@gmail.com"},"dist":{"shasum":"cd6e954dff11821697a9ed5852c7ac5f18df02ce","size":2230,"noattachment":false,"key":"/gar/-/gar-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/gar/download/gar-1.0.3.tgz"},"maintainers":[{"name":"ethan_","email":"futuristiccake@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gar_1.0.3_1518930017618_0.07514497225616656"},"_hasShrinkwrap":false,"publish_time":1518930017685,"_cnpm_publish_time":1518930017685,"_cnpmcore_publish_time":"2021-12-16T20:50:33.442Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.2":{"name":"gar","version":"1.0.2","description":"The lightweight Node arguments parser","main":"index.js","scripts":{"test":"echo \"Tested before deployment.\" && exit 0","test-dev":"npm install && node test.js","prepublishOnly":"npm test"},"repository":{"type":"git","url":"git+https://github.com/ethanent/gar.git"},"keywords":["argument","args","argv","node","parse","cli","command-line","parsing","parser","command","light","lightweight"],"author":{"name":"Ethan Davis"},"license":"SEE LICENSE IN LICENSE.md","bugs":{"url":"https://github.com/ethanent/gar/issues"},"homepage":"https://github.com/ethanent/gar#readme","devDependencies":{"whew":"^1.1.3"},"gitHead":"44c8595ed662385becc310a72f366fac1698cbd6","_id":"gar@1.0.2","_npmVersion":"5.6.0","_nodeVersion":"9.2.0","_npmUser":{"name":"ethan_","email":"futuristiccake@gmail.com"},"dist":{"shasum":"5b7ecbbde1d3a1a8037cccc49971274250ff865b","size":2211,"noattachment":false,"key":"/gar/-/gar-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/gar/download/gar-1.0.2.tgz"},"maintainers":[{"name":"ethan_","email":"futuristiccake@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gar-1.0.2.tgz_1514690370033_0.5706195619422942"},"directories":{},"publish_time":1514690370129,"_hasShrinkwrap":false,"_cnpm_publish_time":1514690370129,"_cnpmcore_publish_time":"2021-12-16T20:50:33.650Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.1":{"name":"gar","version":"1.0.1","description":"The lightweight Node arguments parser","main":"index.js","scripts":{"test":"echo \"Tested before deployment.\" && exit 0","test-dev":"npm install && node test.js","prepublishOnly":"npm test"},"repository":{"type":"git","url":"git+https://github.com/ethanent/gar.git"},"keywords":["argument","args","argv","node","parse","cli","command-line","parsing","parser","command","light","lightweight"],"author":{"name":"Ethan Davis"},"license":"SEE LICENSE IN LICENSE.md","bugs":{"url":"https://github.com/ethanent/gar/issues"},"homepage":"https://github.com/ethanent/gar#readme","devDependencies":{"whew":"^1.1.3"},"gitHead":"223519dc0b48c35d551e5b8ea201929b82575e2e","_id":"gar@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"9.2.0","_npmUser":{"name":"ethan_","email":"futuristiccake@gmail.com"},"dist":{"shasum":"74ee1cc102e0b25ceb756b33e2be7a2a13f1fd24","size":2127,"noattachment":false,"key":"/gar/-/gar-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/gar/download/gar-1.0.1.tgz"},"maintainers":[{"name":"ethan_","email":"futuristiccake@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gar-1.0.1.tgz_1514678407437_0.16910207364708185"},"directories":{},"publish_time":1514678407539,"_hasShrinkwrap":false,"_cnpm_publish_time":1514678407539,"_cnpmcore_publish_time":"2021-12-16T20:50:33.907Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.0":{"name":"gar","version":"1.0.0","description":"The lightweight Node arguments parser","main":"index.js","scripts":{"test":"echo \"Tested before deployment.\" && exit 0","test-dev":"npm install && node test.js","prepublishOnly":"npm test"},"repository":{"type":"git","url":"git+https://github.com/ethanent/gar.git"},"keywords":["argument","args","argv","node","parse","cli","command-line","parsing","parser","command","light","lightweight"],"author":{"name":"Ethan Davis"},"license":"SEE LICENSE IN LICENSE.md","bugs":{"url":"https://github.com/ethanent/gar/issues"},"homepage":"https://github.com/ethanent/gar#readme","devDependencies":{"whew":"^1.1.3"},"gitHead":"ab4e90376a387fd43677e5a7bf62b0c31a621557","_id":"gar@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.2.0","_npmUser":{"name":"ethan_","email":"futuristiccake@gmail.com"},"dist":{"shasum":"580d985ac9fd83a3ec6b4ae79d79d02c224d439b","size":1942,"noattachment":false,"key":"/gar/-/gar-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gar/download/gar-1.0.0.tgz"},"maintainers":[{"name":"ethan_","email":"futuristiccake@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gar-1.0.0.tgz_1514677759983_0.8795996692497283"},"directories":{},"publish_time":1514677760102,"_hasShrinkwrap":false,"_cnpm_publish_time":1514677760102,"_cnpmcore_publish_time":"2021-12-16T20:50:34.141Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"readme":"# gar\r\n> The lightweight Node arguments parser\r\n\r\n[GitHub](https://github.com/ethanent/gar) | [NPM](https://www.npmjs.com/package/gar)\r\n\r\n## Install\r\n\r\n```bash\r\nnpm i gar\r\n```\r\n\r\n## Use\r\n\r\n![gar usage demo](https://i.imgur.com/Ln6A8Nn.png)\r\n\r\n```javascript\r\nconst args = require('gar')(process.argv.slice(2))\r\n\r\nconsole.log(args)\r\n```\r\n\r\nSo for: `-h hey --toggle -ac --hey=hi -spaced \"hey there\" -num 1 lone`\r\n\r\n```json\r\n{\r\n\t\"h\": \"hey\",\r\n\t\"toggle\": true,\r\n\t\"a\": true,\r\n\t\"c\": true,\r\n\t\"hey\": \"hi\",\r\n\t\"spaced\": \"hey there\",\r\n\t\"num\": 1,\r\n\t\"_\": [\"lone\"]\r\n}\r\n```\r\n\r\n## Why use gar?\r\n\r\ngar is way more lightweight than other argument parsing packages.\r\n\r\nHere's a size comparison table:\r\n\r\nPackage | Size\r\n--- | ---\r\noptimist | [![optimist package size](https://packagephobia.now.sh/badge?p=optimist)](https://packagephobia.now.sh/result?p=optimist)\r\nminimist | [![minimist package size](https://packagephobia.now.sh/badge?p=minimist)](https://packagephobia.now.sh/result?p=minimist)\r\nargs-parser | [![args-parser package size](https://packagephobia.now.sh/badge?p=args-parser)](https://packagephobia.now.sh/result?p=args-parser)\r\ngar | [![gar package size](https://packagephobia.now.sh/badge?p=gar)](https://packagephobia.now.sh/result?p=gar)","_attachments":{},"homepage":"https://github.com/ethanent/gar#readme","bugs":{"url":"https://github.com/ethanent/gar/issues"},"license":"MIT"}