@reggi/help.string-argv
v0.0.194
Published
Convert a string of argv input to array
Readme
@reggi/help.string-argv
npm i @reggi/help.string-argv --saveWhy
Takes a string and uses a child process to stdout the results of process.argv as JSON. Uses child process to spawn a Node.js instance so it is very accurate to how node splits it's argv string.
import stringArgv from 'help.string-argv'
stringArgv('--name thomas').then(res => console.log) // => ['--name', 'thomas']