Open harshil-darji opened 3 years ago
Thanks for the contribution @harshil-darji
I actually ended up implementing this in #15 a few days back. There were a few requirements I left out in the original issue that I think that version implements 😅. They include:
Also the command scheme has changed such that the output is something like now:
I have implemented the command parser and it works perfectly as you suggested it. An example goes as follows:
commandName --f1 v1 v2 v3 --f2 v4 v5 --f5
Such a message will return a following object-
{ commandName: { f1: [ 'v1', 'v2', 'v3' ], f2: [ 'v4', 'v5' ], f5: undefined } }
I have added a generic folder to keep all the utils in one place which is where I implemented the command parser.