Splits string
into an array of its words.
[string]
(string): string to inspect for words[pattern]
(RegExp|string): regex pattern to match words or string of characters to split words by.
(Array): Returns an array of words
const result = words('I can, I should, & I will');
console.log(result);
// => ['I', 'can', 'I', 'should', 'I', 'will']