@formatjs/intl-segmenter 11.2.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.
Files changed (46) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +3 -0
  3. package/lib/polyfill-force.d.ts +2 -0
  4. package/lib/polyfill-force.d.ts.map +1 -0
  5. package/lib/polyfill-force.js +7 -0
  6. package/lib/polyfill.d.ts +2 -0
  7. package/lib/polyfill.d.ts.map +1 -0
  8. package/lib/polyfill.js +10 -0
  9. package/lib/should-polyfill.d.ts +2 -0
  10. package/lib/should-polyfill.d.ts.map +1 -0
  11. package/lib/should-polyfill.js +3 -0
  12. package/lib/src/cldr-segmentation-rules.generated.d.ts +384 -0
  13. package/lib/src/cldr-segmentation-rules.generated.d.ts.map +1 -0
  14. package/lib/src/cldr-segmentation-rules.generated.js +1265 -0
  15. package/lib/src/segmentation-utils.d.ts +3 -0
  16. package/lib/src/segmentation-utils.d.ts.map +1 -0
  17. package/lib/src/segmentation-utils.js +32 -0
  18. package/lib/src/segmenter.d.ts +56 -0
  19. package/lib/src/segmenter.d.ts.map +1 -0
  20. package/lib/src/segmenter.js +270 -0
  21. package/lib/test262-main.d.ts +2 -0
  22. package/lib/test262-main.d.ts.map +1 -0
  23. package/lib/test262-main.js +3 -0
  24. package/package.json +30 -0
  25. package/polyfill-force.d.ts +2 -0
  26. package/polyfill-force.d.ts.map +1 -0
  27. package/polyfill-force.js +9 -0
  28. package/polyfill.d.ts +2 -0
  29. package/polyfill.d.ts.map +1 -0
  30. package/polyfill.iife.js +2414 -0
  31. package/polyfill.js +12 -0
  32. package/should-polyfill.d.ts +2 -0
  33. package/should-polyfill.d.ts.map +1 -0
  34. package/should-polyfill.js +7 -0
  35. package/src/cldr-segmentation-rules.generated.d.ts +384 -0
  36. package/src/cldr-segmentation-rules.generated.d.ts.map +1 -0
  37. package/src/cldr-segmentation-rules.generated.js +1268 -0
  38. package/src/segmentation-utils.d.ts +3 -0
  39. package/src/segmentation-utils.d.ts.map +1 -0
  40. package/src/segmentation-utils.js +37 -0
  41. package/src/segmenter.d.ts +56 -0
  42. package/src/segmenter.d.ts.map +1 -0
  43. package/src/segmenter.js +273 -0
  44. package/test262-main.d.ts +2 -0
  45. package/test262-main.d.ts.map +1 -0
  46. package/test262-main.js +5 -0
@@ -0,0 +1,3 @@
1
+ export declare const replaceVariables: (variables: Record<string, string>, input: string) => string;
2
+ export declare const isSurrogate: (str: string, pos: number) => boolean;
3
+ //# sourceMappingURL=segmentation-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segmentation-utils.d.ts","sourceRoot":"","sources":["segmentation-utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,cAChB,OAAO,MAAM,EAAE,MAAM,CAAC,SAC1B,MAAM,WASd,CAAA;AAED,eAAO,MAAM,WAAW,QAAS,MAAM,OAAO,MAAM,YAOnD,CAAA"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isSurrogate = exports.replaceVariables = void 0;
4
+ var replaceVariables = function (variables, input) {
5
+ var findVarRegex = /\$[A-Za-z0-9_]+/gm;
6
+ return input.replaceAll(findVarRegex, function (match) {
7
+ if (!(match in variables)) {
8
+ throw new Error("No such variable ".concat(match));
9
+ }
10
+ return variables[match];
11
+ });
12
+ };
13
+ exports.replaceVariables = replaceVariables;
14
+ var isSurrogate = function (str, pos) {
15
+ return (0xd800 <= str.charCodeAt(pos - 1) &&
16
+ str.charCodeAt(pos - 1) <= 0xdbff &&
17
+ 0xdc00 <= str.charCodeAt(pos) &&
18
+ str.charCodeAt(pos) <= 0xdfff);
19
+ };
20
+ exports.isSurrogate = isSurrogate;
21
+ // alternative surrogate check mimicking the java implementation
22
+ // const TRAIL_SURROGATE_BITMASK = 0xfffffc00
23
+ // const TRAIL_SURROGATE_BITS = 0xdc00
24
+ // const LEAD_SURROGATE_BITMASK = 0xfffffc00
25
+ // const LEAD_SURROGATE_BITS = 0xd800
26
+ // const isSurrogate = (text: string, position: number) => {
27
+ // if (
28
+ // (text.charCodeAt(position - 1) & LEAD_SURROGATE_BITMASK) ==
29
+ // LEAD_SURROGATE_BITS &&
30
+ // (text.charCodeAt(position) & TRAIL_SURROGATE_BITMASK) ==
31
+ // TRAIL_SURROGATE_BITS
32
+ // ) {
33
+ // return true
34
+ // } else {
35
+ // return false
36
+ // }
37
+ // }
@@ -0,0 +1,56 @@
1
+ type SegmentResult = {
2
+ segment: string;
3
+ breakingRule?: string;
4
+ nonBreakingRules?: string[];
5
+ } | undefined;
6
+ export interface SegmenterOptions {
7
+ localeMatcher?: 'lookup' | 'best fit';
8
+ granularity?: 'word' | 'sentence' | 'grapheme';
9
+ }
10
+ export interface SegmenterResolvedOptions {
11
+ locale: string;
12
+ granularity: NonNullable<SegmenterOptions['granularity']>;
13
+ }
14
+ declare const breaksAtResult: (breaks: boolean, matchingRule: string) => {
15
+ breaks: boolean;
16
+ matchingRule: string;
17
+ };
18
+ export declare class Segmenter {
19
+ private readonly rules;
20
+ private readonly ruleSortedKeys;
21
+ private readonly mergedSegmentationTypeValue;
22
+ constructor(locales: string | string[] | undefined, options: SegmenterOptions);
23
+ breaksAt(position: number, input: string): ReturnType<typeof breaksAtResult>;
24
+ segment(input: string): SegmentIterator;
25
+ resolvedOptions(): SegmenterResolvedOptions;
26
+ static availableLocales: Set<string>;
27
+ static supportedLocalesOf(locales?: string | string[], options?: Pick<SegmenterOptions, 'localeMatcher'>): string[];
28
+ static readonly polyfilled = true;
29
+ }
30
+ declare class SegmentIterator implements Iterable<SegmentResult>, Iterator<SegmentResult> {
31
+ private readonly segmenter;
32
+ private lastSegmentIndex;
33
+ private input;
34
+ constructor(segmenter: Segmenter, input: string);
35
+ [Symbol.iterator](): SegmentIterator;
36
+ next(): {
37
+ done: boolean;
38
+ value: {
39
+ segment: string;
40
+ index: number;
41
+ input: string;
42
+ isWordLike?: boolean | undefined;
43
+ };
44
+ } | {
45
+ done: boolean;
46
+ value: undefined;
47
+ };
48
+ containing(positionInput: number): {
49
+ segment: string;
50
+ index: number;
51
+ input: string;
52
+ isWordLike?: boolean | undefined;
53
+ } | undefined;
54
+ }
55
+ export type { SegmentIterator };
56
+ //# sourceMappingURL=segmenter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segmenter.d.ts","sourceRoot":"","sources":["segmenter.ts"],"names":[],"mappings":"AA+BA,KAAK,aAAa,GACd;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;CAAC,GACrE,SAAS,CAAA;AAEb,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IACrC,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,CAAA;CAC/C;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,WAAW,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAA;CAC1D;AAoDD,QAAA,MAAM,cAAc,WAAY,OAAO,gBAAgB,MAAM;;;CAG3D,CAAA;AAEF,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAA;IACtB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAA;IAC/B,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAyB;gBAGnE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,EACtC,OAAO,EAAE,gBAAgB;IA0EpB,QAAQ,CACb,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACZ,UAAU,CAAC,OAAO,cAAc,CAAC;IA6DpC,OAAO,CAAC,KAAK,EAAE,MAAM;IAKrB,eAAe,IAAI,wBAAwB;IAY3C,MAAM,CAAC,gBAAgB,cAEtB;IACD,MAAM,CAAC,kBAAkB,CACvB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAC3B,OAAO,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,eAAe,CAAC,GAChD,MAAM,EAAE;IAOX,gBAAuB,UAAU,QAAO;CACzC;AAwBD,cAAM,eACJ,YAAW,QAAQ,CAAC,aAAa,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC;IAE3D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAA;IAC1B,OAAO,CAAC,gBAAgB,CAAA;IACxB,OAAO,CAAC,KAAK,CAAA;gBACD,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM;IAS/C,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB,IAAI;;;;;;;;;;;;IA+BJ,UAAU,CAAC,aAAa,EAAE,MAAM;;;;;;CAqDjC;AAED,YAAY,EAAC,eAAe,EAAC,CAAA"}
@@ -0,0 +1,273 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Segmenter = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var cldr_segmentation_rules_generated_1 = require("./cldr-segmentation-rules.generated");
6
+ var segmentation_utils_1 = require("./segmentation-utils");
7
+ var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
8
+ var intl_localematcher_1 = require("@formatjs/intl-localematcher");
9
+ /**
10
+ * Adds $ to before rules and ^ to after rules for strickness
11
+ * Replaces variables
12
+ * Initializes the RegExp
13
+ *
14
+ * @param rule raw rule string from cldr-segmentation-rules.generated
15
+ * @param variables
16
+ * @param after appends ^ if true and $ if false
17
+ * @returns
18
+ */
19
+ var generateRuleRegex = function (rule, variables, after) {
20
+ return new RegExp("".concat(after ? '^' : '').concat((0, segmentation_utils_1.replaceVariables)(variables, rule)).concat(after ? '' : '$'));
21
+ };
22
+ var prepareLocaleSegmentationRules = function (segmentationTypeValue) {
23
+ var preparedRules = {};
24
+ for (var _i = 0, _a = Object.keys(segmentationTypeValue.segmentRules); _i < _a.length; _i++) {
25
+ var ruleNr = _a[_i];
26
+ var ruleValue = segmentationTypeValue.segmentRules[ruleNr];
27
+ var preparedRule = {
28
+ breaks: ruleValue.breaks,
29
+ };
30
+ if ('before' in ruleValue && ruleValue.before) {
31
+ preparedRule.before = generateRuleRegex(ruleValue.before, segmentationTypeValue.variables, false);
32
+ }
33
+ if ('after' in ruleValue && ruleValue.after) {
34
+ preparedRule.after = generateRuleRegex(ruleValue.after, segmentationTypeValue.variables, true);
35
+ }
36
+ preparedRules[ruleNr] = preparedRule;
37
+ }
38
+ return preparedRules;
39
+ };
40
+ var breaksAtResult = function (breaks, matchingRule) { return ({
41
+ breaks: breaks,
42
+ matchingRule: matchingRule,
43
+ }); };
44
+ var Segmenter = /** @class */ (function () {
45
+ function Segmenter(locales, options) {
46
+ var _newTarget = this.constructor;
47
+ if (_newTarget === undefined) {
48
+ throw TypeError("Constructor Intl.Segmenter requires 'new'");
49
+ }
50
+ var requestedLocales = (0, ecma402_abstract_1.CanonicalizeLocaleList)(locales);
51
+ options = (0, ecma402_abstract_1.GetOptionsObject)(options);
52
+ var opt = Object.create(null);
53
+ var matcher = (0, ecma402_abstract_1.GetOption)(options, 'localeMatcher', 'string', ['lookup', 'best fit'], 'best fit');
54
+ opt.localeMatcher = matcher;
55
+ var granularity = (0, ecma402_abstract_1.GetOption)(options, 'granularity', 'string', ['word', 'sentence', 'grapheme'], 'grapheme');
56
+ setSlot(this, 'granularity', granularity);
57
+ //TODO: figure out correct availible locales
58
+ var r = (0, intl_localematcher_1.ResolveLocale)(Segmenter.availableLocales, //availible locales
59
+ requestedLocales, opt, [], // there is no relevantExtensionKeys
60
+ {}, function () { return ''; } //use only root rules
61
+ );
62
+ setSlot(this, 'locale', r.locale);
63
+ //root rules based on granularity
64
+ this.mergedSegmentationTypeValue = cldr_segmentation_rules_generated_1.SegmentationRules.root[granularity];
65
+ //merge root rules with locale ones if locale is specified
66
+ if (r.locale.length) {
67
+ var localeOverrides = cldr_segmentation_rules_generated_1.SegmentationRules[r.locale];
68
+ if (granularity in localeOverrides) {
69
+ var localeSegmentationTypeValue = localeOverrides[granularity];
70
+ this.mergedSegmentationTypeValue.variables = tslib_1.__assign(tslib_1.__assign({}, this.mergedSegmentationTypeValue.variables), localeSegmentationTypeValue.variables);
71
+ this.mergedSegmentationTypeValue.segmentRules = tslib_1.__assign(tslib_1.__assign({}, this.mergedSegmentationTypeValue.segmentRules), localeSegmentationTypeValue.segmentRules);
72
+ this.mergedSegmentationTypeValue.suppressions = tslib_1.__spreadArray(tslib_1.__spreadArray([], this.mergedSegmentationTypeValue.suppressions, true), localeSegmentationTypeValue.suppressions, true);
73
+ }
74
+ }
75
+ //prepare rules
76
+ this.rules = prepareLocaleSegmentationRules(this.mergedSegmentationTypeValue);
77
+ //order rule keys
78
+ this.ruleSortedKeys = Object.keys(this.rules).sort(function (a, b) { return Number(a) - Number(b); });
79
+ }
80
+ Segmenter.prototype.breaksAt = function (position, input) {
81
+ var ruleSortedKeys = this.ruleSortedKeys;
82
+ var rules = this.rules;
83
+ var mergedSegmentationTypeValue = this.mergedSegmentationTypeValue;
84
+ //artificial rule 0.2
85
+ if (position === 0) {
86
+ return breaksAtResult(true, '0.2');
87
+ }
88
+ if (position === input.length) {
89
+ //rule 0.3
90
+ return breaksAtResult(true, '0.3');
91
+ }
92
+ //artificial rule 0.1: js specific, due to es5 regex not being unicode aware
93
+ //number 0.1 chosen to mimic java implementation, but needs to execute after 0.2 and 0.3 to be inside the string bounds
94
+ if ((0, segmentation_utils_1.isSurrogate)(input, position)) {
95
+ return breaksAtResult(false, '0.1');
96
+ }
97
+ var stringBeforeBreak = input.substring(0, position);
98
+ var stringAfterBreak = input.substring(position);
99
+ //artificial rule 0.4: handle suppressions
100
+ if ('suppressions' in mergedSegmentationTypeValue) {
101
+ for (var _i = 0, _a = mergedSegmentationTypeValue.suppressions; _i < _a.length; _i++) {
102
+ var suppressions = _a[_i];
103
+ if (stringBeforeBreak.trim().endsWith(suppressions)) {
104
+ return breaksAtResult(false, '0.4');
105
+ }
106
+ }
107
+ }
108
+ // loop through rules and find a match
109
+ for (var _b = 0, ruleSortedKeys_1 = ruleSortedKeys; _b < ruleSortedKeys_1.length; _b++) {
110
+ var ruleKey = ruleSortedKeys_1[_b];
111
+ var _c = rules[ruleKey], before = _c.before, after = _c.after, breaks = _c.breaks;
112
+ // for debugging
113
+ // if (ruleKey === '16' && position === 4) {
114
+ // console.log({before, after, stringBeforeBreak, stringAfterBreak})
115
+ // }
116
+ if (before) {
117
+ if (!before.test(stringBeforeBreak)) {
118
+ //didn't match the before part, therfore skipping
119
+ continue;
120
+ }
121
+ }
122
+ if (after) {
123
+ if (!after.test(stringAfterBreak)) {
124
+ //didn't match the after part, therfore skipping
125
+ continue;
126
+ }
127
+ }
128
+ return breaksAtResult(breaks, ruleKey);
129
+ }
130
+ //artificial rule 999: if no rule matched is Any ÷ Any so return true
131
+ return breaksAtResult(true, '999');
132
+ };
133
+ Segmenter.prototype.segment = function (input) {
134
+ checkReceiver(this, 'segment');
135
+ return new SegmentIterator(this, input);
136
+ };
137
+ Segmenter.prototype.resolvedOptions = function () {
138
+ checkReceiver(this, 'resolvedOptions');
139
+ return tslib_1.__assign({}, (0, ecma402_abstract_1.getMultiInternalSlots)(__INTERNAL_SLOT_MAP__, this, 'locale', 'granularity'));
140
+ };
141
+ Segmenter.supportedLocalesOf = function (locales, options) {
142
+ return (0, ecma402_abstract_1.SupportedLocales)(Segmenter.availableLocales, (0, ecma402_abstract_1.CanonicalizeLocaleList)(locales), options);
143
+ };
144
+ Segmenter.availableLocales = new Set(Object.keys(cldr_segmentation_rules_generated_1.SegmentationRules).filter(function (key) { return key !== 'root'; }));
145
+ Segmenter.polyfilled = true;
146
+ return Segmenter;
147
+ }());
148
+ exports.Segmenter = Segmenter;
149
+ var createSegmentDataObject = function (segmenter, segment, index, input, matchingRule) {
150
+ var returnValue = {
151
+ segment: segment,
152
+ index: index,
153
+ input: input,
154
+ };
155
+ if (getSlot(segmenter, 'granularity') === 'word') {
156
+ returnValue.isWordLike = matchingRule !== '3.1' && matchingRule !== '3.2';
157
+ }
158
+ return returnValue;
159
+ };
160
+ var SegmentIterator = /** @class */ (function () {
161
+ function SegmentIterator(segmenter, input) {
162
+ this.segmenter = segmenter;
163
+ this.lastSegmentIndex = 0;
164
+ if (typeof input == 'symbol') {
165
+ throw TypeError("Input must not be a symbol");
166
+ }
167
+ this.input = String(input);
168
+ }
169
+ SegmentIterator.prototype[Symbol.iterator] = function () {
170
+ return new SegmentIterator(this.segmenter, this.input);
171
+ };
172
+ SegmentIterator.prototype.next = function () {
173
+ //using only the relevant bit of the string
174
+ var checkString = this.input.substring(this.lastSegmentIndex);
175
+ //loop from the start of the checkString, until exactly length (breaksAt returns break at pos=== lenght)
176
+ for (var position = 1; position <= checkString.length; position++) {
177
+ var _a = this.segmenter.breaksAt(position, checkString), breaks = _a.breaks, matchingRule = _a.matchingRule;
178
+ if (breaks) {
179
+ var segment = checkString.substring(0, position);
180
+ var index = this.lastSegmentIndex;
181
+ this.lastSegmentIndex += position;
182
+ return {
183
+ done: false,
184
+ value: createSegmentDataObject(this.segmenter, segment, index, this.input, matchingRule),
185
+ };
186
+ }
187
+ }
188
+ //no segment was found by the loop, therefore the segmentation is done
189
+ return { done: true, value: undefined };
190
+ };
191
+ SegmentIterator.prototype.containing = function (positionInput) {
192
+ if (typeof positionInput === 'bigint') {
193
+ throw TypeError('Index must not be a BigInt');
194
+ }
195
+ var position = Number(positionInput);
196
+ //https://tc39.es/ecma262/#sec-tointegerorinfinity
197
+ // 2. If number is NaN, +0𝔽, or -0𝔽, return 0.
198
+ if (isNaN(position) || !position) {
199
+ position = 0;
200
+ }
201
+ // 5. Let integer be floor(abs(ℝ(number))).
202
+ // 6. If number < -0𝔽, set integer to -integer.
203
+ position = Math.floor(Math.abs(position)) * (position < 0 ? -1 : 1);
204
+ if (position < 0 || position >= this.input.length) {
205
+ return undefined;
206
+ }
207
+ //find previous break point
208
+ var previousBreakPoint = 0;
209
+ if (position === 0) {
210
+ previousBreakPoint = 0;
211
+ }
212
+ else {
213
+ var checkString_1 = this.input;
214
+ for (var cursor = position; cursor >= 0; cursor--) {
215
+ var breaks = this.segmenter.breaksAt(cursor, checkString_1).breaks;
216
+ if (breaks) {
217
+ previousBreakPoint = cursor;
218
+ break;
219
+ }
220
+ }
221
+ }
222
+ var checkString = this.input.substring(previousBreakPoint);
223
+ //find next break point
224
+ for (var cursor = 1; cursor <= checkString.length; cursor++) {
225
+ var _a = this.segmenter.breaksAt(cursor, checkString), breaks = _a.breaks, matchingRule = _a.matchingRule;
226
+ if (breaks) {
227
+ var segment = checkString.substring(0, cursor);
228
+ return createSegmentDataObject(this.segmenter, segment, previousBreakPoint, this.input, matchingRule);
229
+ }
230
+ }
231
+ };
232
+ return SegmentIterator;
233
+ }());
234
+ var __INTERNAL_SLOT_MAP__ = new WeakMap();
235
+ function getSlot(instance, key) {
236
+ return (0, ecma402_abstract_1.getInternalSlot)(__INTERNAL_SLOT_MAP__, instance, key);
237
+ }
238
+ function setSlot(instance, key, value) {
239
+ (0, ecma402_abstract_1.setInternalSlot)(__INTERNAL_SLOT_MAP__, instance, key, value);
240
+ }
241
+ function checkReceiver(receiver, methodName) {
242
+ if (!(receiver instanceof Segmenter)) {
243
+ throw TypeError("Method Intl.Segmenter.prototype.".concat(methodName, " called on incompatible receiver"));
244
+ }
245
+ }
246
+ try {
247
+ // IE11 does not have Symbol
248
+ if (typeof Symbol !== 'undefined') {
249
+ Object.defineProperty(Segmenter.prototype, Symbol.toStringTag, {
250
+ value: 'Intl.Segmenter',
251
+ writable: false,
252
+ enumerable: false,
253
+ configurable: true,
254
+ });
255
+ }
256
+ //github.com/tc39/test262/blob/main/test/intl402/Segmenter/constructor/length.js
257
+ https: Object.defineProperty(Segmenter.prototype.constructor, 'length', {
258
+ value: 0,
259
+ writable: false,
260
+ enumerable: false,
261
+ configurable: true,
262
+ });
263
+ // https://github.com/tc39/test262/blob/main/test/intl402/Segmenter/constructor/supportedLocalesOf/length.js
264
+ Object.defineProperty(Segmenter.supportedLocalesOf, 'length', {
265
+ value: 1,
266
+ writable: false,
267
+ enumerable: false,
268
+ configurable: true,
269
+ });
270
+ }
271
+ catch (e) {
272
+ // Meta fix so we're test262-compliant, not important
273
+ }
@@ -0,0 +1,2 @@
1
+ import './polyfill-force';
2
+ //# sourceMappingURL=test262-main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test262-main.d.ts","sourceRoot":"","sources":["test262-main.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @generated
4
+ // @ts-nocheck
5
+ require("./polyfill-force");