A simple parser for command line arguments
npm install @devoszhang/simple-parse-args``js`
// demo.js
const options = parseArgs();
console.log(JSON.stringify(options, undefined, 4));`
+ with typets`
const options = parseArgs<{hello: string; world: string; greet?: boolean;}>();
`bash`
node demo.js --hello=123 --world=456 --greet`
+ outputjson``
{
"hello": "123",
"world": "456",
"greet": true
}