@devoszhang/simple-parse-args
v1.0.1
Published
A simple parser for command line arguments
Maintainers
Readme
// demo.js
const options = parseArgs();
console.log(JSON.stringify(options, undefined, 4));- with type
const options = parseArgs<{hello: string; world: string; greet?: boolean;}>();node demo.js --hello=123 --world=456 --greet- output
{
"hello": "123",
"world": "456",
"greet": true
}