UNPKG

splitargs2

Version:

Splits a string into tokens by a given separator, treating any quoted parts as a single token.

12 lines (11 loc) 462 B
/** * Splits a string into tokens by a given separator, treating any quoted parts as a single token. * * @param input The string to tokenize. * @param keepQuotes If true, quoted tokens will maintain their quote characters. Default: `false`. * @param separator Matches separators for tokens. Default: `/\s/g`. */ declare module 'splitargs2' { function splitargs(input: string, keepQuotes?: boolean, separator?: RegExp): string[]; export = splitargs; }