Skip to main content

Intl.Segmenter

A polyfill for Intl.Segmenter.

npm Version size

Installation

npm i @formatjs/intl-segmenter

Features

Everything in intl-segmenter proposal

Usage

Simple

import '@formatjs/intl-segmenter/polyfill'

Dynamic import + capability detection

import {shouldPolyfill} from '@formatjs/intl-segmenter/should-polyfill'
async function polyfill(locale: string) {
if (shouldPolyfill()) {
await import('@formatjs/intl-segmenter/polyfill-force')
}
}