@formatjs/intl-durationformat 0.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.
- package/LICENSE.md +9 -0
- package/README.md +3 -0
- package/index.d.ts +1 -0
- package/index.js +4 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/polyfill-force.d.ts +1 -0
- package/lib/polyfill-force.js +18 -0
- package/lib/polyfill.d.ts +1 -0
- package/lib/polyfill.js +21 -0
- package/lib/should-polyfill.d.ts +1 -0
- package/lib/should-polyfill.js +3 -0
- package/lib/src/abstract/DurationRecordSign.d.ts +2 -0
- package/lib/src/abstract/DurationRecordSign.js +13 -0
- package/lib/src/abstract/GetDurationUnitOptions.d.ts +4 -0
- package/lib/src/abstract/GetDurationUnitOptions.js +43 -0
- package/lib/src/abstract/IsValidDurationRecord.d.ts +2 -0
- package/lib/src/abstract/IsValidDurationRecord.js +18 -0
- package/lib/src/abstract/PartitionDurationFormatPattern.d.ts +3 -0
- package/lib/src/abstract/PartitionDurationFormatPattern.js +149 -0
- package/lib/src/abstract/ToDurationRecord.d.ts +2 -0
- package/lib/src/abstract/ToDurationRecord.js +68 -0
- package/lib/src/abstract/ToIntegerIfIntegral.d.ts +1 -0
- package/lib/src/abstract/ToIntegerIfIntegral.js +8 -0
- package/lib/src/constants.d.ts +63 -0
- package/lib/src/constants.js +84 -0
- package/lib/src/core.d.ts +14 -0
- package/lib/src/core.js +236 -0
- package/lib/src/get_internal_slots.d.ts +2 -0
- package/lib/src/get_internal_slots.js +9 -0
- package/lib/src/numbering-systems.generated.d.ts +1 -0
- package/lib/src/numbering-systems.generated.js +1 -0
- package/lib/src/time-separators.generated.d.ts +2123 -0
- package/lib/src/time-separators.generated.js +3541 -0
- package/lib/src/types.d.ts +108 -0
- package/lib/src/types.js +2 -0
- package/package.json +32 -0
- package/polyfill-force.d.ts +1 -0
- package/polyfill-force.js +20 -0
- package/polyfill.d.ts +1 -0
- package/polyfill.js +23 -0
- package/should-polyfill.d.ts +1 -0
- package/should-polyfill.js +7 -0
- package/src/abstract/DurationRecordSign.d.ts +2 -0
- package/src/abstract/DurationRecordSign.js +17 -0
- package/src/abstract/GetDurationUnitOptions.d.ts +4 -0
- package/src/abstract/GetDurationUnitOptions.js +47 -0
- package/src/abstract/IsValidDurationRecord.d.ts +2 -0
- package/src/abstract/IsValidDurationRecord.js +22 -0
- package/src/abstract/PartitionDurationFormatPattern.d.ts +3 -0
- package/src/abstract/PartitionDurationFormatPattern.js +153 -0
- package/src/abstract/ToDurationRecord.d.ts +2 -0
- package/src/abstract/ToDurationRecord.js +72 -0
- package/src/abstract/ToIntegerIfIntegral.d.ts +1 -0
- package/src/abstract/ToIntegerIfIntegral.js +12 -0
- package/src/constants.d.ts +63 -0
- package/src/constants.js +87 -0
- package/src/core.d.ts +14 -0
- package/src/core.js +239 -0
- package/src/get_internal_slots.d.ts +2 -0
- package/src/get_internal_slots.js +13 -0
- package/src/numbering-systems.generated.d.ts +1 -0
- package/src/numbering-systems.generated.js +4 -0
- package/src/time-separators.generated.d.ts +2123 -0
- package/src/time-separators.generated.js +3544 -0
- package/src/types.d.ts +108 -0
- package/src/types.js +3 -0
package/src/constants.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TABLE_2 = exports.TABLE_1 = void 0;
|
|
4
|
+
exports.TABLE_1 = [
|
|
5
|
+
'years',
|
|
6
|
+
'months',
|
|
7
|
+
'weeks',
|
|
8
|
+
'days',
|
|
9
|
+
'hours',
|
|
10
|
+
'minutes',
|
|
11
|
+
'seconds',
|
|
12
|
+
'milliseconds',
|
|
13
|
+
'microseconds',
|
|
14
|
+
'nanoseconds',
|
|
15
|
+
];
|
|
16
|
+
exports.TABLE_2 = [
|
|
17
|
+
{
|
|
18
|
+
valueField: 'years',
|
|
19
|
+
styleSlot: 'years',
|
|
20
|
+
displaySlot: 'yearsDisplay',
|
|
21
|
+
unit: 'years',
|
|
22
|
+
numberFormatUnit: 'year',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
valueField: 'months',
|
|
26
|
+
styleSlot: 'months',
|
|
27
|
+
displaySlot: 'monthsDisplay',
|
|
28
|
+
unit: 'months',
|
|
29
|
+
numberFormatUnit: 'month',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
valueField: 'weeks',
|
|
33
|
+
styleSlot: 'weeks',
|
|
34
|
+
displaySlot: 'weeksDisplay',
|
|
35
|
+
unit: 'weeks',
|
|
36
|
+
numberFormatUnit: 'week',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
valueField: 'days',
|
|
40
|
+
styleSlot: 'days',
|
|
41
|
+
displaySlot: 'daysDisplay',
|
|
42
|
+
unit: 'days',
|
|
43
|
+
numberFormatUnit: 'day',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
valueField: 'hours',
|
|
47
|
+
styleSlot: 'hours',
|
|
48
|
+
displaySlot: 'hoursDisplay',
|
|
49
|
+
unit: 'hours',
|
|
50
|
+
numberFormatUnit: 'hour',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
valueField: 'minutes',
|
|
54
|
+
styleSlot: 'minutes',
|
|
55
|
+
displaySlot: 'minutesDisplay',
|
|
56
|
+
unit: 'minutes',
|
|
57
|
+
numberFormatUnit: 'minute',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
valueField: 'seconds',
|
|
61
|
+
styleSlot: 'seconds',
|
|
62
|
+
displaySlot: 'secondsDisplay',
|
|
63
|
+
unit: 'seconds',
|
|
64
|
+
numberFormatUnit: 'second',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
valueField: 'milliseconds',
|
|
68
|
+
styleSlot: 'milliseconds',
|
|
69
|
+
displaySlot: 'millisecondsDisplay',
|
|
70
|
+
unit: 'milliseconds',
|
|
71
|
+
numberFormatUnit: 'millisecond',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
valueField: 'microseconds',
|
|
75
|
+
styleSlot: 'microseconds',
|
|
76
|
+
displaySlot: 'microsecondsDisplay',
|
|
77
|
+
unit: 'microseconds',
|
|
78
|
+
numberFormatUnit: 'microsecond',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
valueField: 'nanoseconds',
|
|
82
|
+
styleSlot: 'nanoseconds',
|
|
83
|
+
displaySlot: 'nanosecondsDisplay',
|
|
84
|
+
unit: 'nanoseconds',
|
|
85
|
+
numberFormatUnit: 'nanosecond',
|
|
86
|
+
},
|
|
87
|
+
];
|
package/src/core.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DurationFormatLocaleInternalData, DurationFormatPart, DurationFormat as DurationFormatType, DurationInput, ResolvedDurationFormatOptions } from './types';
|
|
2
|
+
import { DurationFormatOptions } from './types';
|
|
3
|
+
export declare class DurationFormat implements DurationFormatType {
|
|
4
|
+
constructor(locales?: string | string[], options?: DurationFormatOptions);
|
|
5
|
+
resolvedOptions(): ResolvedDurationFormatOptions;
|
|
6
|
+
formatToParts(duration: DurationInput): DurationFormatPart[];
|
|
7
|
+
format(duration: DurationInput): string;
|
|
8
|
+
static supportedLocalesOf(locales: string | string[], options?: Pick<DurationFormatOptions, 'localeMatcher'>): string[];
|
|
9
|
+
static __defaultLocale: string;
|
|
10
|
+
static availableLocales: Set<string>;
|
|
11
|
+
static localeData: Record<string, DurationFormatLocaleInternalData | undefined>;
|
|
12
|
+
static getDefaultLocale: () => string;
|
|
13
|
+
static polyfilled: boolean;
|
|
14
|
+
}
|
package/src/core.js
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DurationFormat = void 0;
|
|
4
|
+
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
|
+
var intl_localematcher_1 = require("@formatjs/intl-localematcher");
|
|
6
|
+
var GetDurationUnitOptions_1 = require("./abstract/GetDurationUnitOptions");
|
|
7
|
+
var PartitionDurationFormatPattern_1 = require("./abstract/PartitionDurationFormatPattern");
|
|
8
|
+
var ToDurationRecord_1 = require("./abstract/ToDurationRecord");
|
|
9
|
+
var get_internal_slots_1 = require("./get_internal_slots");
|
|
10
|
+
var numbering_systems_generated_1 = require("./numbering-systems.generated");
|
|
11
|
+
var time_separators_generated_1 = require("./time-separators.generated");
|
|
12
|
+
var RESOLVED_OPTIONS_KEYS = [
|
|
13
|
+
'locale',
|
|
14
|
+
'style',
|
|
15
|
+
'years',
|
|
16
|
+
'yearsDisplay',
|
|
17
|
+
'months',
|
|
18
|
+
'monthsDisplay',
|
|
19
|
+
'weeks',
|
|
20
|
+
'weeksDisplay',
|
|
21
|
+
'days',
|
|
22
|
+
'daysDisplay',
|
|
23
|
+
'hours',
|
|
24
|
+
'hoursDisplay',
|
|
25
|
+
'minutes',
|
|
26
|
+
'minutesDisplay',
|
|
27
|
+
'seconds',
|
|
28
|
+
'secondsDisplay',
|
|
29
|
+
'milliseconds',
|
|
30
|
+
'millisecondsDisplay',
|
|
31
|
+
'microseconds',
|
|
32
|
+
'microsecondsDisplay',
|
|
33
|
+
'nanoseconds',
|
|
34
|
+
'nanosecondsDisplay',
|
|
35
|
+
'numberingSystem',
|
|
36
|
+
'fractionalDigits',
|
|
37
|
+
];
|
|
38
|
+
var TABLE_3 = [
|
|
39
|
+
{
|
|
40
|
+
styleSlot: 'years',
|
|
41
|
+
displaySlot: 'yearsDisplay',
|
|
42
|
+
unit: 'years',
|
|
43
|
+
values: ['long', 'short', 'narrow'],
|
|
44
|
+
digitalDefault: 'short',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
styleSlot: 'months',
|
|
48
|
+
displaySlot: 'monthsDisplay',
|
|
49
|
+
unit: 'months',
|
|
50
|
+
values: ['long', 'short', 'narrow'],
|
|
51
|
+
digitalDefault: 'short',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
styleSlot: 'weeks',
|
|
55
|
+
displaySlot: 'weeksDisplay',
|
|
56
|
+
unit: 'weeks',
|
|
57
|
+
values: ['long', 'short', 'narrow'],
|
|
58
|
+
digitalDefault: 'short',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
styleSlot: 'days',
|
|
62
|
+
displaySlot: 'daysDisplay',
|
|
63
|
+
unit: 'days',
|
|
64
|
+
values: ['long', 'short', 'narrow'],
|
|
65
|
+
digitalDefault: 'short',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
styleSlot: 'hours',
|
|
69
|
+
displaySlot: 'hoursDisplay',
|
|
70
|
+
unit: 'hours',
|
|
71
|
+
values: ['long', 'short', 'narrow', 'numeric', '2-digit'],
|
|
72
|
+
digitalDefault: 'numeric',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
styleSlot: 'minutes',
|
|
76
|
+
displaySlot: 'minutesDisplay',
|
|
77
|
+
unit: 'minutes',
|
|
78
|
+
values: ['long', 'short', 'narrow', 'numeric', '2-digit'],
|
|
79
|
+
digitalDefault: 'numeric',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
styleSlot: 'seconds',
|
|
83
|
+
displaySlot: 'secondsDisplay',
|
|
84
|
+
unit: 'seconds',
|
|
85
|
+
values: ['long', 'short', 'narrow', 'numeric', '2-digit'],
|
|
86
|
+
digitalDefault: 'numeric',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
styleSlot: 'milliseconds',
|
|
90
|
+
displaySlot: 'millisecondsDisplay',
|
|
91
|
+
unit: 'milliseconds',
|
|
92
|
+
values: ['long', 'short', 'narrow', 'numeric'],
|
|
93
|
+
digitalDefault: 'numeric',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
styleSlot: 'microseconds',
|
|
97
|
+
displaySlot: 'microsecondsDisplay',
|
|
98
|
+
unit: 'microseconds',
|
|
99
|
+
values: ['long', 'short', 'narrow', 'numeric'],
|
|
100
|
+
digitalDefault: 'numeric',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
styleSlot: 'nanoseconds',
|
|
104
|
+
displaySlot: 'nanosecondsDisplay',
|
|
105
|
+
unit: 'nanoseconds',
|
|
106
|
+
values: ['long', 'short', 'narrow', 'numeric'],
|
|
107
|
+
digitalDefault: 'numeric',
|
|
108
|
+
},
|
|
109
|
+
];
|
|
110
|
+
var DurationFormat = /** @class */ (function () {
|
|
111
|
+
function DurationFormat(locales, options) {
|
|
112
|
+
// test262/test/intl402/ListFormat/constructor/constructor/newtarget-undefined.js
|
|
113
|
+
// Cannot use `new.target` bc of IE11 & TS transpiles it to something else
|
|
114
|
+
var newTarget = this && this instanceof DurationFormat ? this.constructor : void 0;
|
|
115
|
+
if (!newTarget) {
|
|
116
|
+
throw new TypeError("Intl.DurationFormat must be called with 'new'");
|
|
117
|
+
}
|
|
118
|
+
var requestedLocales = (0, ecma402_abstract_1.CanonicalizeLocaleList)(locales);
|
|
119
|
+
var opt = Object.create(null);
|
|
120
|
+
var opts = options === undefined ? Object.create(null) : (0, ecma402_abstract_1.ToObject)(options);
|
|
121
|
+
var matcher = (0, ecma402_abstract_1.GetOption)(opts, 'localeMatcher', 'string', ['best fit', 'lookup'], 'best fit');
|
|
122
|
+
var numberingSystem = (0, ecma402_abstract_1.GetOption)(opts, 'numberingSystem', 'string', undefined, undefined);
|
|
123
|
+
if (numberingSystem !== undefined &&
|
|
124
|
+
numbering_systems_generated_1.numberingSystemNames.indexOf(numberingSystem) < 0) {
|
|
125
|
+
// 8.a. If numberingSystem does not match the Unicode Locale Identifier type nonterminal,
|
|
126
|
+
// throw a RangeError exception.
|
|
127
|
+
throw RangeError("Invalid numberingSystems: ".concat(numberingSystem));
|
|
128
|
+
}
|
|
129
|
+
opt.nu = numberingSystem;
|
|
130
|
+
opt.localeMatcher = matcher;
|
|
131
|
+
var localeData = DurationFormat.localeData, availableLocales = DurationFormat.availableLocales;
|
|
132
|
+
var r = (0, intl_localematcher_1.ResolveLocale)(availableLocales, requestedLocales, opt,
|
|
133
|
+
// [[RelevantExtensionKeys]] slot, which is a constant
|
|
134
|
+
['nu'], localeData, DurationFormat.getDefaultLocale);
|
|
135
|
+
var locale = r.locale;
|
|
136
|
+
var internalSlots = (0, get_internal_slots_1.getInternalSlots)(this);
|
|
137
|
+
internalSlots.initializedDurationFormat = true;
|
|
138
|
+
internalSlots.locale = locale;
|
|
139
|
+
internalSlots.numberingSystem = r.nu;
|
|
140
|
+
var style = (0, ecma402_abstract_1.GetOption)(opts, 'style', 'string', ['long', 'short', 'narrow', 'digital'], 'short');
|
|
141
|
+
internalSlots.style = style;
|
|
142
|
+
internalSlots.dataLocale = r.dataLocale;
|
|
143
|
+
var prevStyle = '';
|
|
144
|
+
TABLE_3.forEach(function (row) {
|
|
145
|
+
var styleSlot = row.styleSlot, displaySlot = row.displaySlot, unit = row.unit, valueList = row.values, digitalBase = row.digitalDefault;
|
|
146
|
+
var unitOptions = (0, GetDurationUnitOptions_1.GetDurationUnitOptions)(unit, opts, style, valueList, digitalBase, prevStyle);
|
|
147
|
+
internalSlots[styleSlot] = unitOptions.style;
|
|
148
|
+
internalSlots[displaySlot] = unitOptions.display;
|
|
149
|
+
if (unit === 'hours' ||
|
|
150
|
+
unit === 'minutes' ||
|
|
151
|
+
unit === 'seconds' ||
|
|
152
|
+
unit === 'milliseconds' ||
|
|
153
|
+
unit === 'microseconds') {
|
|
154
|
+
prevStyle = unitOptions.style;
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
internalSlots.fractionalDigits = (0, ecma402_abstract_1.GetNumberOption)(opts, 'fractionalDigits', 0, 9, undefined);
|
|
158
|
+
}
|
|
159
|
+
DurationFormat.prototype.resolvedOptions = function () {
|
|
160
|
+
if (typeof this !== 'object' ||
|
|
161
|
+
!(0, ecma402_abstract_1.OrdinaryHasInstance)(DurationFormat, this)) {
|
|
162
|
+
throw TypeError('Method Intl.DurationFormat.prototype.resolvedOptions called on incompatible receiver');
|
|
163
|
+
}
|
|
164
|
+
var internalSlots = (0, get_internal_slots_1.getInternalSlots)(this);
|
|
165
|
+
var ro = {};
|
|
166
|
+
for (var _i = 0, RESOLVED_OPTIONS_KEYS_1 = RESOLVED_OPTIONS_KEYS; _i < RESOLVED_OPTIONS_KEYS_1.length; _i++) {
|
|
167
|
+
var key = RESOLVED_OPTIONS_KEYS_1[_i];
|
|
168
|
+
var v = internalSlots[key];
|
|
169
|
+
if (key === 'fractionalDigits') {
|
|
170
|
+
if (v !== undefined) {
|
|
171
|
+
v = Number(v);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
(0, ecma402_abstract_1.invariant)(v !== undefined, "Missing internal slot ".concat(key));
|
|
176
|
+
}
|
|
177
|
+
ro[key] = v;
|
|
178
|
+
}
|
|
179
|
+
return ro;
|
|
180
|
+
};
|
|
181
|
+
DurationFormat.prototype.formatToParts = function (duration) {
|
|
182
|
+
var df = this;
|
|
183
|
+
var locInternalSlots = (0, get_internal_slots_1.getInternalSlots)(this);
|
|
184
|
+
if (locInternalSlots.initializedDurationFormat === undefined) {
|
|
185
|
+
throw new TypeError('Error uninitialized locale');
|
|
186
|
+
}
|
|
187
|
+
var record = (0, ToDurationRecord_1.ToDurationRecord)(duration);
|
|
188
|
+
var parts = (0, PartitionDurationFormatPattern_1.PartitionDurationFormatPattern)(df, record);
|
|
189
|
+
var result = [];
|
|
190
|
+
for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {
|
|
191
|
+
var _a = parts_1[_i], type = _a.type, unit = _a.unit, value = _a.value;
|
|
192
|
+
var obj = { type: type, value: value };
|
|
193
|
+
if (unit) {
|
|
194
|
+
obj.unit = unit;
|
|
195
|
+
}
|
|
196
|
+
result.push(obj);
|
|
197
|
+
}
|
|
198
|
+
return result;
|
|
199
|
+
};
|
|
200
|
+
DurationFormat.prototype.format = function (duration) {
|
|
201
|
+
var df = this;
|
|
202
|
+
var locInternalSlots = (0, get_internal_slots_1.getInternalSlots)(this);
|
|
203
|
+
if (locInternalSlots.initializedDurationFormat === undefined) {
|
|
204
|
+
throw new TypeError('Error uninitialized locale');
|
|
205
|
+
}
|
|
206
|
+
var record = (0, ToDurationRecord_1.ToDurationRecord)(duration);
|
|
207
|
+
var parts = (0, PartitionDurationFormatPattern_1.PartitionDurationFormatPattern)(df, record);
|
|
208
|
+
var result = '';
|
|
209
|
+
for (var _i = 0, parts_2 = parts; _i < parts_2.length; _i++) {
|
|
210
|
+
var value = parts_2[_i].value;
|
|
211
|
+
result += value;
|
|
212
|
+
}
|
|
213
|
+
return result;
|
|
214
|
+
};
|
|
215
|
+
DurationFormat.supportedLocalesOf = function (locales, options) {
|
|
216
|
+
return (0, ecma402_abstract_1.SupportedLocales)(DurationFormat.availableLocales, (0, ecma402_abstract_1.CanonicalizeLocaleList)(locales), options);
|
|
217
|
+
};
|
|
218
|
+
DurationFormat.__defaultLocale = 'en';
|
|
219
|
+
DurationFormat.availableLocales = new Set();
|
|
220
|
+
DurationFormat.localeData = Object.keys(time_separators_generated_1.TIME_SEPARATORS.localeData).reduce(function (all, locale) {
|
|
221
|
+
DurationFormat.availableLocales.add(locale);
|
|
222
|
+
var nu = time_separators_generated_1.TIME_SEPARATORS.localeData[locale].nu;
|
|
223
|
+
all[locale] = {
|
|
224
|
+
nu: nu,
|
|
225
|
+
digitalFormat: time_separators_generated_1.TIME_SEPARATORS.localeData[locale].separator ||
|
|
226
|
+
nu.reduce(function (separators, n) {
|
|
227
|
+
separators[n] = time_separators_generated_1.TIME_SEPARATORS.default;
|
|
228
|
+
return separators;
|
|
229
|
+
}, {}),
|
|
230
|
+
};
|
|
231
|
+
return all;
|
|
232
|
+
}, {});
|
|
233
|
+
DurationFormat.getDefaultLocale = function () {
|
|
234
|
+
return DurationFormat.__defaultLocale;
|
|
235
|
+
};
|
|
236
|
+
DurationFormat.polyfilled = true;
|
|
237
|
+
return DurationFormat;
|
|
238
|
+
}());
|
|
239
|
+
exports.DurationFormat = DurationFormat;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInternalSlots = void 0;
|
|
4
|
+
var internalSlotMap = new WeakMap();
|
|
5
|
+
function getInternalSlots(x) {
|
|
6
|
+
var internalSlots = internalSlotMap.get(x);
|
|
7
|
+
if (!internalSlots) {
|
|
8
|
+
internalSlots = Object.create(null);
|
|
9
|
+
internalSlotMap.set(x, internalSlots);
|
|
10
|
+
}
|
|
11
|
+
return internalSlots;
|
|
12
|
+
}
|
|
13
|
+
exports.getInternalSlots = getInternalSlots;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const numberingSystemNames: ReadonlyArray<string>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.numberingSystemNames = void 0;
|
|
4
|
+
exports.numberingSystemNames = ["adlm", "ahom", "arab", "arabext", "armn", "armnlow", "bali", "beng", "bhks", "brah", "cakm", "cham", "cyrl", "deva", "diak", "ethi", "fullwide", "geor", "gong", "gonm", "grek", "greklow", "gujr", "guru", "hanidays", "hanidec", "hans", "hansfin", "hant", "hantfin", "hebr", "hmng", "hmnp", "java", "jpan", "jpanfin", "jpanyear", "kali", "kawi", "khmr", "knda", "lana", "lanatham", "laoo", "latn", "lepc", "limb", "mathbold", "mathdbl", "mathmono", "mathsanb", "mathsans", "mlym", "modi", "mong", "mroo", "mtei", "mymr", "mymrshan", "mymrtlng", "nagm", "newa", "nkoo", "olck", "orya", "osma", "rohg", "roman", "romanlow", "saur", "segment", "shrd", "sind", "sinh", "sora", "sund", "takr", "talu", "taml", "tamldec", "telu", "thai", "tibt", "tirh", "tnsa", "vaii", "wara", "wcho"];
|