splitargs
splitargs copied to clipboard
Splits strings into tokens by given separator, treating quoted part as a single token.
create door with inscription "user beware: \\"temet nosce meow\\"" result [ 'create', 'door', 'with', 'inscription', 'user beware: temet', 'nosce', 'meow' ] expected [ 'create', 'door', 'with', 'inscription', 'user beware: "temet...
If my separator is " ", I'd like "\ " not to be considered a separator.
This pull request fixes the probably unintended lack of proper heading formatting in the README.
This has almost everything I need for an args splitter, except being able to specify a count and ignoring separators after an amount of items has been reached. ## Example...
quotes
On OSX, the following command line: ``` bash npm config set init.author.name Steven"Vachon" --verbose ``` produces the following value for `process.argv`: ``` js ["npm","config","set","init.author.name","Steven\"Vachon\"","--verbose"] ``` while splitargs produces: ``` js...