Anyone know where I can find the argv parser in Node's source code? I'm building a CLI framework & am hoping to use the same parser for testing via App.test(argvString).So assuming I execute this:node some_script.js firstArg secondArgThe full argv would be this:process.argv // ['C:/path/to/node.exe', 'C:/path/to/some_script.js', "firstArg", "secondArg"]And I need the parser that isolated these:process.argv.slice(2) // ["firstArg", "secondArg"]EDIT: Hmm I just found some stuff @ node-master\deps\uv\src\win\process.c @ am maybe wondering if I should actually be looking into how the OS terminal handles args...
Submitted July 03, 2018 at 02:45PM by enteleform
No comments:
Post a Comment