1.0.5 • Published 9 years ago
split-shell-string v1.0.5
split-shell-string
Parser for shell argument strings. This is not to be used to parse arguments passed to your program, as those are already parsed by a shell.
var splitShell = require('split-shell-string');
console.info(splitShell.parse('"test" \'test\' \'test\\\' test\' test "test test" test\ 123 -n -b / [^ ]+ / /\s+/ test\ test'));
// [
// "test", "test", "test' test", "test", "test test", "test 123", "-n", "-b",
// [^ ]+ /, /\s+/, "test test"
// ]