Instead of having a type property with either a "string" or "boolean" value, I believe it would be more intuitive to have a boolean property with either true or false value, with the default value being false.
options: {
verbose: {
short: "v",
boolean: true
}
}
Furthermore, I would prefer the options to be an array of objects, as this would make it easier work with them.
options: [
{
long: "output",
short: "o",
required: true
},
{
long: "verbose",
short: "v",
boolean: true
}
}
Thank you for including the parseArgs feature in Node!
Instead of having a
typeproperty with either a"string"or"boolean"value, I believe it would be more intuitive to have abooleanproperty with eithertrueorfalsevalue, with the default value being false.Furthermore, I would prefer the options to be an array of objects, as this would make it easier work with them.
Thank you for including the parseArgs feature in Node!