Intl.Segmenter Reaches Baseline Status
Frontend developers now have access to locale-aware text segmentation through the Intl.Segmenter object, which has officially joined the Baseline set of web platform features.
The API enables splitting strings into words, sentences, or graphemes according to linguistic rules. This matters because many non-Latin languages—including Chinese and Japanese—do not separate words with spaces, so the conventional JavaScript split() method on whitespace produces incorrect results for such text.
To use it, create a new Intl.Segmenter instance via the Intl.segmenter() constructor, passing a locale and an options object where granularity can be set to "grapheme", "word", or "sentence". Then call segment() with a string to get an iterable of segmented parts.
For hands-on guidance, refer to the Polypane blog tutorial "Using the Intl.Segmenter API," or the article "International Text Segmentation with Intl.Segmenter in JavaScript" for advanced examples including emoji handling.



