input string
boolean indicating whether whitespace characters should be returned as part of the token array (default: false)
array of tokens
var str = 'Hello World!';
var out = tokenize( str );
// returns [ 'Hello', 'World', '!' ]
var str = '';
var out = tokenize( str );
// returns []
var str = 'Hello Mrs. Maple, could you call me back?';
var out = tokenize( str );
// returns [ 'Hello', 'Mrs.', 'Maple', ',', 'could', 'you', 'call', 'me', 'back', '?' ]
Tokenize a string.