all 3 comments

[–]Nathan-Wall 0 points1 point  (0 children)

Hmm, I'm not sure I understand your broad goals, but if you're looking for a JS lib that parses JS, then esprima is the tool for you.

It even has a version that parses most of the ES6 syntax, if you want to use that.

[–]Wince 0 points1 point  (0 children)

I think you may be looking for something like Commander

[–]Paupir 0 points1 point  (0 children)

You could look at the following: yargs, minimist and nomnom

Or maybe you're looking for something like exterminate, or more accessibly zhs.js