{"_id":"@3xpo/argparser","_rev":"10-f4553a08df7d58a346fa6d2c39744eb4","name":"@3xpo/argparser","dist-tags":{"latest":"1.1.2"},"versions":{"1.1.0":{"name":"@3xpo/argparser","version":"1.1.0","description":"parse node args","main":"dist/lib.cjs","module":"dist/lib.esm.mjs","types":"dist/main.d.ts","typings":"dist/main.d.ts","exports":{".":{"import":"./dist/lib.esm.mjs","require":"./dist/lib.cjs","types":"./dist/main.d.ts","default":"./dist/lib.esm.mjs"}},"keywords":["cli","args","arg-parsing"],"author":{"name":"Expo"},"maintainers":[{"name":"exponentialworkload","email":"cc@aaathats3as.com"}],"license":"MIT","devDependencies":{"@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^11.1.5","@types/jest":"^29.5.10","@types/node":"^20.10.0","changelogen":"^0.5.5","jest":"^29.7.0","nodemon":"^3.0.1","rollup":"^4.6.0","ts-jest":"^29.1.1","tslib":"^2.6.2","typedoc":"^0.25.4","typescript":"^5.3.2"},"optionalDependencies":{"posixparser":"^1.0.1"},"repository":{"type":"git","url":"git+https://github.com/Exponential-Workload/argparser.git"},"homepage":"https://gh.expo.moe/argparser","sideEffects":false,"scripts":{"build":"rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript","build:docs":"typedoc --out docs --tsconfig doctsconfig.json dist/main.d.ts","test":"jest --passWithNoTests","nodemonBase":"nodemon -e  ts,js,json,md --watch src --watch package.json --watch '*.config.js' --watch '*.config.ts' --watch tsconfig.json","dev:docs:build":"npm run nodemonBase -- --watch doctsconfig.json --watch README.md --exec \"npm run build:docs\"","dev:docs:serve":"cd docs && serve","dev:docs":"mkdir -p docs && concurrently -n dev:docs:build,dev:docs:serve -c blue,green \"npm run dev:docs:build\" \"npm run dev:docs:serve\"","dev":"npm run nodemonBase -- --exec \"npm run test\""},"bugs":{"url":"https://github.com/Exponential-Workload/argparser/issues"},"dependencies":{"posixparser":"^1.0.1"},"_id":"@3xpo/argparser@1.1.0","_integrity":"sha512-Jcoc66ErMP+3/iv3vS56YV/sZ6UmyzBKk7H73BbPneUBh76iE4rSWIRKCwKkZHd00hlydxusuTK6h+YCw9D+jg==","_resolved":"/tmp/0400fe9e68a387d82a443b2e500cbf33/3xpo-argparser-1.1.0.tgz","_from":"file:3xpo-argparser-1.1.0.tgz","_nodeVersion":"21.1.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-Jcoc66ErMP+3/iv3vS56YV/sZ6UmyzBKk7H73BbPneUBh76iE4rSWIRKCwKkZHd00hlydxusuTK6h+YCw9D+jg==","shasum":"9835dfaa71bff382f72b9647307c1d8e81c40e7e","tarball":"https://registry.npmjs.org/@3xpo/argparser/-/argparser-1.1.0.tgz","fileCount":21,"unpackedSize":40186,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7z6amGLPxj/0lvLC4Mn/Hfwbg1vNBSMkyzbmXM0DoBgIgdBcrAtPRMb8+6b7nX5d4FwSnsIVX5YZ3icVa2vdOmtU="}]},"_npmUser":{"name":"exponentialworkload","email":"cc@aaathats3as.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/argparser_1.1.0_1701267036842_0.2900426777364429"},"_hasShrinkwrap":false},"1.1.1":{"name":"@3xpo/argparser","version":"1.1.1","description":"parse node args","main":"dist/lib.cjs","module":"dist/lib.esm.mjs","types":"dist/main.d.ts","typings":"dist/main.d.ts","exports":{".":{"import":"./dist/lib.esm.mjs","require":"./dist/lib.cjs","types":"./dist/main.d.ts","default":"./dist/lib.esm.mjs"}},"keywords":["cli","args","arg-parsing"],"author":{"name":"Expo"},"maintainers":[{"name":"exponentialworkload","email":"cc@aaathats3as.com"}],"license":"MIT","devDependencies":{"@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^11.1.5","@types/jest":"^29.5.10","@types/node":"^20.10.0","changelogen":"^0.5.5","jest":"^29.7.0","nodemon":"^3.0.1","rollup":"^4.6.0","ts-jest":"^29.1.1","tslib":"^2.6.2","typedoc":"^0.25.4","typescript":"^5.3.2"},"optionalDependencies":{"posixparser":"^1.0.1"},"repository":{"type":"git","url":"git+https://github.com/Exponential-Workload/argparser.git"},"homepage":"https://gh.expo.moe/argparser","sideEffects":false,"scripts":{"build":"rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript","build:docs":"typedoc --out docs --tsconfig doctsconfig.json dist/main.d.ts","test":"jest --passWithNoTests","nodemonBase":"nodemon -e  ts,js,json,md --watch src --watch package.json --watch '*.config.js' --watch '*.config.ts' --watch tsconfig.json","dev:docs:build":"npm run nodemonBase -- --watch doctsconfig.json --watch README.md --exec \"npm run build:docs\"","dev:docs:serve":"cd docs && serve","dev:docs":"mkdir -p docs && concurrently -n dev:docs:build,dev:docs:serve -c blue,green \"npm run dev:docs:build\" \"npm run dev:docs:serve\"","dev":"npm run nodemonBase -- --exec \"npm run test\""},"bugs":{"url":"https://github.com/Exponential-Workload/argparser/issues"},"dependencies":{"posixparser":"^1.0.1"},"_id":"@3xpo/argparser@1.1.1","_integrity":"sha512-qplDkMvIJdWRzp/NrtlyNUlDkr7PvsyHXQz28QluuO8/BY5JhheXgjFelw8ls4KkfU4IO8JzkBi04FOC5SCKkg==","_resolved":"/tmp/64d4da8de95454307edcee8d1fa1fe83/3xpo-argparser-1.1.1.tgz","_from":"file:3xpo-argparser-1.1.1.tgz","_nodeVersion":"21.1.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-qplDkMvIJdWRzp/NrtlyNUlDkr7PvsyHXQz28QluuO8/BY5JhheXgjFelw8ls4KkfU4IO8JzkBi04FOC5SCKkg==","shasum":"eff60ec9a011f009b45c335789f11997c675ffd8","tarball":"https://registry.npmjs.org/@3xpo/argparser/-/argparser-1.1.1.tgz","fileCount":21,"unpackedSize":41777,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwoTDIMNO/oJzHbD4AO1oUYut2MzuF7RBsVISR99OCOQIgZICE7EyeEImhlu8QPCuy9AULRncGIx5pBEYKgBlPv/M="}]},"_npmUser":{"name":"exponentialworkload","email":"cc@aaathats3as.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/argparser_1.1.1_1701267857340_0.2976543605870621"},"_hasShrinkwrap":false},"1.1.2":{"name":"@3xpo/argparser","version":"1.1.2","description":"parse node args","main":"dist/lib.cjs","module":"dist/lib.mjs","types":"dist/main.d.ts","typings":"dist/main.d.ts","exports":{".":{"import":"./dist/lib.mjs","require":"./dist/lib.cjs","types":"./dist/main.d.ts","default":"./dist/lib.mjs"}},"keywords":["cli","args","arg-parsing"],"author":{"name":"Expo"},"maintainers":[{"name":"exponentialworkload","email":"cc@aaathats3as.com"}],"license":"MIT","devDependencies":{"@types/jest":"^29.5.10","@types/node":"^20.10.0","changelogen":"^0.5.5","esbuild":"^0.19.8","jest":"^29.7.0","nodemon":"^3.0.1","ts-jest":"^29.1.1","tslib":"^2.6.2","typedoc":"^0.25.4","typescript":"^5.3.2"},"optionalDependencies":{"posixparser":"^1.0.1"},"repository":{"type":"git","url":"git+https://github.com/Exponential-Workload/argparser.git"},"homepage":"https://gh.expo.moe/argparser","sideEffects":false,"scripts":{"build":"concurrently \"pnpm esb --outfile=dist/lib.cjs --format=cjs\" \"pnpm esb --outfile=dist/lib.mjs --format=esm\" \"tsc --declaration --emitDeclarationOnly\"","esb":"esbuild src/main.ts --platform=node --bundle --packages=external --minify","build:docs":"typedoc --out docs --tsconfig doctsconfig.json dist/main.d.ts","test":"jest --passWithNoTests","nodemonBase":"nodemon -e  ts,js,json,md --watch src --watch package.json --watch '*.config.js' --watch '*.config.ts' --watch tsconfig.json","dev:docs:build":"npm run nodemonBase -- --watch doctsconfig.json --watch README.md --exec \"npm run build:docs\"","dev:docs:serve":"cd docs && serve","dev:docs":"mkdir -p docs && concurrently -n dev:docs:build,dev:docs:serve -c blue,green \"npm run dev:docs:build\" \"npm run dev:docs:serve\"","dev":"npm run nodemonBase -- --exec \"npm run test\""},"bugs":{"url":"https://github.com/Exponential-Workload/argparser/issues"},"dependencies":{"posixparser":"^1.0.1"},"_id":"@3xpo/argparser@1.1.2","_integrity":"sha512-hmk6huGu6YmoAGDlXOpsI8rBxlly/xKDM89Y4G2x06xTvQJAPWbrhnbqLGb5BbTP9CJ/CiS7modFyCZx1eMpZA==","_resolved":"/tmp/6543822ab295e603a136457e8cd6d4f8/3xpo-argparser-1.1.2.tgz","_from":"file:3xpo-argparser-1.1.2.tgz","_nodeVersion":"21.1.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-hmk6huGu6YmoAGDlXOpsI8rBxlly/xKDM89Y4G2x06xTvQJAPWbrhnbqLGb5BbTP9CJ/CiS7modFyCZx1eMpZA==","shasum":"414e0cb876a616d5f8bf7bbb5c039a8309ab9c1a","tarball":"https://registry.npmjs.org/@3xpo/argparser/-/argparser-1.1.2.tgz","fileCount":14,"unpackedSize":20074,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEsOIvEVAeOTxfVnNdy5VH+CSUwJiK6iV7CJD+F2vL78AiBm6K19rPMMr6+ID7CRgs/FSF/JgHKhOP8dEpfd7tg1Og=="}]},"_npmUser":{"name":"exponentialworkload","email":"cc@aaathats3as.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/argparser_1.1.2_1701271607409_0.5057675737292433"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-09T11:08:37.236Z","1.0.0":"2023-08-09T11:08:37.537Z","modified":"2023-11-29T15:26:47.879Z","1.0.1":"2023-08-09T11:25:06.160Z","1.0.2":"2023-08-09T11:41:20.152Z","1.0.3":"2023-08-30T02:14:02.350Z","1.1.0":"2023-11-29T14:10:37.155Z","1.1.1":"2023-11-29T14:24:17.495Z","1.1.2":"2023-11-29T15:26:47.666Z"},"maintainers":[{"name":"exponentialworkload","email":"cc@aaathats3as.com"}],"description":"parse node args","homepage":"https://gh.expo.moe/argparser","keywords":["cli","args","arg-parsing"],"repository":{"type":"git","url":"git+https://github.com/Exponential-Workload/argparser.git"},"author":{"name":"Expo"},"bugs":{"url":"https://github.com/Exponential-Workload/argparser/issues"},"license":"MIT","readme":"<div align=\"center\">\n\n![ArgParser 🔍](https://github.com/Exponential-Workload/argparser/blob/master/social.png?raw=true)\n\n[![🧪 Tests](https://img.shields.io/github/actions/workflow/status/Exponential-Workload/argparser/test.yml?branch=master&label=🧪%20Tests)](https://github.com/Exponential-Workload/argparser/actions/workflows/test.yml)\n[![📝 Documentation](https://img.shields.io/badge/📝-Docs-blue)](https://gh.expo.moe/argparser)\n[![📦 NPM](https://img.shields.io/npm/v/%403xpo/argparser?label=📦%20NPM)](https://npmjs.com/package/@3xpo/argparser)\n<br/>\n[![📦 Bundle Size](https://img.shields.io/bundlephobia/min/%403xpo/argparser?label=📦%20Bundle%20Size)](https://bundlephobia.com/package/@3xpo/argparser)\n[![📁 Source Size](https://img.shields.io/github/languages/code-size/Exponential-Workload/argparser?label=📁%20Source%20Size)](https://github.com/Exponential-Workload/argparser)<br/>\nParse NodeJS CLI arguments with ease.\n\n</div>\n\n# 📦 Table of Contents\n\n- [📦 Table of Contents](#-table-of-contents)\n- [🚀 Setup](#-setup)\n- [🛠️ Usage](#️-usage)\n- [📜 License](#-license)\n- [🔗 See Also](#-see-also)\n\n# 🚀 Setup\n\n```sh\npnpm i @3xpo/argparser\n```\n\n# 🛠️ Usage\n\n```ts\nimport ArgParser from '@3xpo/argparser';\n\nconst argParser = new ArgParser()\n  .defineArgument({\n    type: 'string',\n    name: 'arg1',\n    aliases: ['a', 'b'],\n    default: 'default value',\n    description: 'This is a description of the argument',\n  })\n  .defineArgument({\n    type: 'boolean',\n    name: 'arg2',\n    aliases: ['c'],\n    default: 'default value',\n    description: 'This is a description of the argument',\n  });\n\n// generic is inferred, and can be overwritten to manually specify arg types\nconst args = argParser.parse(['--arg1', 'value1', '-c', 'hi']); // => { arg1: 'value1', arg2: true, _: ['hi'] }\nconst args2 = argParser.parse(['--arg1', 'value1', '-c', 'false', 'hi']); // => { arg1: 'value1', arg2: false, _: ['hi'] }\n```\n\nOr, if you prefer non-inferred types:\n\n```ts\nimport ArgParser from '@3xpo/argparser';\n\nconst argParser = new ArgParser();\nargParser.defineArgument({\n  type: 'string',\n  name: 'arg1',\n  aliases: ['a', 'b'],\n  default: 'default value',\n  description: 'This is a description of the argument',\n});\nargParser.defineArgument({\n  type: 'boolean',\n  name: 'arg2',\n  aliases: ['c'],\n  default: 'default value',\n  description: 'This is a description of the argument',\n});\n\n// generic is optional, however necessary for typesafety\nconst args = argParser.parse<{\n  arg1: string;\n  arg2: boolean;\n}>(['--arg1', 'value1', '-c', 'hi']); // => { arg1: 'value1', arg2: true, _: ['hi'] }\nconst args2 = argParser.parse<{\n  arg1: string;\n  arg2: boolean;\n}>(['--arg1', 'value1', '-c', 'false', 'hi']); // => { arg1: 'value1', arg2: false, _: ['hi'] }\n```\n\nFor more detailed examples, see the [🧪 Tests](https://github.com/Exponential-Workload/argparser/blob/master/src/main.test.ts).<br/>\nFor technical reference, see the [📝 Documentation](https://gh.expo.moe/argparser).\n\n# 📜 License\n\nThis project is licensed under the [📄 MIT License](https://gh.expo.moe/argparser/LICENSE.txt)\n\n# 🔗 See Also\n\n- [📦](https://npm.im/posixparser) [📁](https://github.com/Exponential-Workload/posixparser) [posixparser](https://gh.expo.moe/posixparser/) — Parse a POSIX-CLI-Styled string into a string[]\n- [📦](https://npm.im/yargs) [📁](https://github.dev/yargs/yargs/) [yargs](https://yargs.js.org/) — The project that heavily inspired this one\n","readmeFilename":"README.md"}