UNPKG

unicode-segmenter

Version:

A lightweight implementation of the Unicode Text Segmentation (UAX #29)

17 lines (14 loc) 342 B
import { Segmenter } from './intl-adapter.js'; ((intl) => { let key = 'Segmenter'; if (typeof intl !== 'object' || intl.hasOwnProperty(key)) { return; } Object.defineProperty(intl, key, { value: Segmenter, enumerable: false, writable: true, configurable: true, }); })(globalThis.Intl); /* Not a pure module */