Separates text into an array of [whitespace, word] tuples, preserving the whitespace.
[[whitespace, word], ...]
spacedWords('\t Hello \n world ')`// Returns:// [// ['\t ', 'Hello'],// [' \n ', 'world'],// [' ', '']// ] Copy
spacedWords('\t Hello \n world ')`// Returns:// [// ['\t ', 'Hello'],// [' \n ', 'world'],// [' ', '']// ]
Separates text into an array of [whitespace, word] tuples, preserving the whitespace.