Customization

A better splitting alternative

A robust alternative to `split()` in Javascript is `Intl.Segmenter()` which has better support for internationalization when working with real language. The API supports granularity at the sentence, word, and grapheme level. 

On the functional level, it is backed by the Unicode Standard segmentation rules, and offers exceptional support across languages that may not have word separators.

Also, there's an interesting grammar to how this interacts with language, a conceit of mine, as seen in properties like "is word-like".

let segmenter = new Intl.Segmenter('en', { granularity: 'word' })
return [...segmenter.segment(str)].filter((segment) => segment.isWordLike)