@formatjs/intl-segmenter 11.5.8 → 11.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/src/cldr-segmentation-rules.generated.d.ts +2 -1
- package/lib/src/cldr-segmentation-rules.generated.js +42 -41
- package/lib/src/segmenter.d.ts +2 -2
- package/lib/src/segmenter.js +4 -4
- package/package.json +4 -4
- package/polyfill.iife.js +1872 -1815
- package/should-polyfill.js +1 -2
- package/src/cldr-segmentation-rules.generated.d.ts +2 -1
- package/src/cldr-segmentation-rules.generated.js +42 -41
- package/src/segmenter.d.ts +2 -2
- package/src/segmenter.js +3 -3
package/lib/src/segmenter.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ declare class SegmentIterator implements Iterable<SegmentResult>, Iterator<Segme
|
|
|
39
39
|
segment: string;
|
|
40
40
|
index: number;
|
|
41
41
|
input: string;
|
|
42
|
-
isWordLike?: boolean
|
|
42
|
+
isWordLike?: boolean;
|
|
43
43
|
};
|
|
44
44
|
} | {
|
|
45
45
|
done: boolean;
|
|
@@ -49,7 +49,7 @@ declare class SegmentIterator implements Iterable<SegmentResult>, Iterator<Segme
|
|
|
49
49
|
segment: string;
|
|
50
50
|
index: number;
|
|
51
51
|
input: string;
|
|
52
|
-
isWordLike?: boolean
|
|
52
|
+
isWordLike?: boolean;
|
|
53
53
|
} | undefined;
|
|
54
54
|
}
|
|
55
55
|
export type { SegmentIterator };
|
package/lib/src/segmenter.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __assign, __spreadArray } from "tslib";
|
|
2
|
-
import {
|
|
3
|
-
import { replaceVariables, isSurrogate } from './segmentation-utils';
|
|
4
|
-
import { GetOption, SupportedLocales, CanonicalizeLocaleList, GetOptionsObject, getInternalSlot, setInternalSlot, getMultiInternalSlots, } from '@formatjs/ecma402-abstract';
|
|
2
|
+
import { CanonicalizeLocaleList, GetOption, GetOptionsObject, SupportedLocales, getInternalSlot, getMultiInternalSlots, setInternalSlot, } from '@formatjs/ecma402-abstract';
|
|
5
3
|
import { ResolveLocale } from '@formatjs/intl-localematcher';
|
|
4
|
+
import { SegmentationRules } from './cldr-segmentation-rules.generated';
|
|
5
|
+
import { isSurrogate, replaceVariables } from './segmentation-utils';
|
|
6
6
|
/**
|
|
7
|
-
* Adds $ to before rules and ^ to after rules for
|
|
7
|
+
* Adds $ to before rules and ^ to after rules for strictness
|
|
8
8
|
* Replaces variables
|
|
9
9
|
* Initializes the RegExp
|
|
10
10
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-segmenter",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.6.0",
|
|
4
4
|
"description": "Polyfill for Intl.Segmenter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intl",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"url": "git@github.com:formatjs/formatjs.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"tslib": "^2.
|
|
23
|
-
"@formatjs/
|
|
24
|
-
"@formatjs/
|
|
22
|
+
"tslib": "^2.7.0",
|
|
23
|
+
"@formatjs/intl-localematcher": "0.5.5",
|
|
24
|
+
"@formatjs/ecma402-abstract": "2.2.0"
|
|
25
25
|
},
|
|
26
26
|
"main": "index.js",
|
|
27
27
|
"types": "index.d.ts",
|