-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
First off, I really like this plugin. I've written argv parsing snippets more times than I like and they always come out different. This is a much needed piece of code.
One thing I think would be a good addition is moving all the parsed options into a data object. This would allow us to abstract away all the private data from the public data a user is trying to access.
Instead of
if( program.myoption ){ //do something with myoption}
We can do
if( program.has('myoption') ){ program.get('myoption') }
//also would allow us to easily get all options
console.log(program.get_options()); //returns an object of all parsed options
I haven't dug too deep into this packages code, so perhaps there's an implementation detail that makes storing data this way less than simple. If not, then I'd like to see it work this way.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels