feat: add Intl.Segmenter polyfill (#3688)

This commit is contained in:
fourdim
2023-08-12 01:14:09 +08:00
committed by GitHub
parent 1eaf228a30
commit ee91964998
5 changed files with 34 additions and 5 deletions

View File

@@ -0,0 +1,11 @@
if (Intl.Segmenter === undefined) {
await import('intl-segmenter-polyfill-rs').then(({ Segmenter }) => {
Object.defineProperty(Intl, 'Segmenter', {
value: Segmenter,
configurable: true,
writable: true,
});
});
}
export {};