@formatjs/ecma402-abstract 2.3.5 → 3.0.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/262.d.ts +1 -1
- package/262.js +42 -68
- package/CanonicalizeLocaleList.js +1 -4
- package/CanonicalizeTimeZoneName.js +1 -4
- package/CoerceOptionsToObject.js +3 -6
- package/DefaultNumberOption.js +1 -4
- package/GetNumberOption.js +3 -6
- package/GetOption.js +3 -6
- package/GetOptionsObject.js +1 -4
- package/GetStringOrBooleanOption.js +3 -6
- package/IsSanctionedSimpleUnitIdentifier.js +5 -10
- package/IsValidTimeZoneName.js +1 -4
- package/IsWellFormedCurrencyCode.js +1 -4
- package/IsWellFormedUnitIdentifier.js +5 -8
- package/NumberFormat/ApplyUnsignedRoundingMode.d.ts +2 -2
- package/NumberFormat/ApplyUnsignedRoundingMode.js +5 -8
- package/NumberFormat/CollapseNumberRange.d.ts +1 -1
- package/NumberFormat/CollapseNumberRange.js +1 -4
- package/NumberFormat/ComputeExponent.d.ts +2 -2
- package/NumberFormat/ComputeExponent.js +8 -12
- package/NumberFormat/ComputeExponentForMagnitude.d.ts +2 -2
- package/NumberFormat/ComputeExponentForMagnitude.js +6 -10
- package/NumberFormat/CurrencyDigits.js +3 -6
- package/NumberFormat/FormatApproximately.d.ts +1 -1
- package/NumberFormat/FormatApproximately.js +1 -4
- package/NumberFormat/FormatNumeric.d.ts +2 -2
- package/NumberFormat/FormatNumeric.js +3 -6
- package/NumberFormat/FormatNumericRange.d.ts +2 -2
- package/NumberFormat/FormatNumericRange.js +3 -6
- package/NumberFormat/FormatNumericRangeToParts.d.ts +2 -2
- package/NumberFormat/FormatNumericRangeToParts.js +3 -6
- package/NumberFormat/FormatNumericToParts.d.ts +2 -2
- package/NumberFormat/FormatNumericToParts.js +5 -8
- package/NumberFormat/FormatNumericToString.d.ts +2 -2
- package/NumberFormat/FormatNumericToString.js +16 -19
- package/NumberFormat/GetUnsignedRoundingMode.d.ts +1 -1
- package/NumberFormat/GetUnsignedRoundingMode.js +1 -4
- package/NumberFormat/InitializeNumberFormat.d.ts +1 -1
- package/NumberFormat/InitializeNumberFormat.js +23 -26
- package/NumberFormat/PartitionNumberPattern.d.ts +2 -2
- package/NumberFormat/PartitionNumberPattern.js +12 -16
- package/NumberFormat/PartitionNumberRangePattern.d.ts +2 -2
- package/NumberFormat/PartitionNumberRangePattern.js +12 -15
- package/NumberFormat/SetNumberFormatDigitOptions.d.ts +1 -1
- package/NumberFormat/SetNumberFormatDigitOptions.js +18 -21
- package/NumberFormat/SetNumberFormatUnitOptions.d.ts +1 -1
- package/NumberFormat/SetNumberFormatUnitOptions.js +15 -18
- package/NumberFormat/ToRawFixed.d.ts +2 -2
- package/NumberFormat/ToRawFixed.js +10 -14
- package/NumberFormat/ToRawPrecision.d.ts +2 -2
- package/NumberFormat/ToRawPrecision.js +19 -23
- package/NumberFormat/digit-mapping.generated.js +1 -4
- package/NumberFormat/format_to_parts.d.ts +2 -2
- package/NumberFormat/format_to_parts.js +18 -22
- package/PartitionPattern.d.ts +1 -0
- package/PartitionPattern.js +4 -6
- package/SupportedLocales.js +8 -11
- package/ToIntlMathematicalValue.d.ts +1 -1
- package/ToIntlMathematicalValue.js +12 -16
- package/constants.d.ts +1 -1
- package/constants.js +4 -8
- package/data.js +3 -6
- package/index.d.ts +47 -47
- package/index.js +45 -66
- package/package.json +7 -5
- package/regex.generated.js +1 -4
- package/types/core.js +1 -2
- package/types/date-time.js +2 -5
- package/types/displaynames.d.ts +1 -1
- package/types/displaynames.js +1 -2
- package/types/list.d.ts +1 -1
- package/types/list.js +1 -2
- package/types/number.d.ts +3 -3
- package/types/number.js +1 -2
- package/types/plural-rules.d.ts +2 -2
- package/types/plural-rules.js +1 -2
- package/types/relative-time.d.ts +2 -2
- package/types/relative-time.js +1 -2
- package/utils.js +28 -40
- package/lib/262.d.ts +0 -93
- package/lib/262.js +0 -400
- package/lib/CanonicalizeLocaleList.d.ts +0 -5
- package/lib/CanonicalizeLocaleList.js +0 -8
- package/lib/CanonicalizeTimeZoneName.d.ts +0 -8
- package/lib/CanonicalizeTimeZoneName.js +0 -17
- package/lib/CoerceOptionsToObject.d.ts +0 -6
- package/lib/CoerceOptionsToObject.js +0 -12
- package/lib/DefaultNumberOption.d.ts +0 -8
- package/lib/DefaultNumberOption.js +0 -18
- package/lib/GetNumberOption.d.ts +0 -9
- package/lib/GetNumberOption.js +0 -13
- package/lib/GetOption.d.ts +0 -9
- package/lib/GetOption.js +0 -31
- package/lib/GetOptionsObject.d.ts +0 -6
- package/lib/GetOptionsObject.js +0 -14
- package/lib/GetStringOrBooleanOption.d.ts +0 -10
- package/lib/GetStringOrBooleanOption.js +0 -31
- package/lib/IsSanctionedSimpleUnitIdentifier.d.ts +0 -13
- package/lib/IsSanctionedSimpleUnitIdentifier.js +0 -63
- package/lib/IsValidTimeZoneName.d.ts +0 -9
- package/lib/IsValidTimeZoneName.js +0 -17
- package/lib/IsWellFormedCurrencyCode.d.ts +0 -4
- package/lib/IsWellFormedCurrencyCode.js +0 -21
- package/lib/IsWellFormedUnitIdentifier.d.ts +0 -5
- package/lib/IsWellFormedUnitIdentifier.js +0 -28
- package/lib/NumberFormat/ApplyUnsignedRoundingMode.d.ts +0 -3
- package/lib/NumberFormat/ApplyUnsignedRoundingMode.js +0 -33
- package/lib/NumberFormat/CollapseNumberRange.d.ts +0 -8
- package/lib/NumberFormat/CollapseNumberRange.js +0 -50
- package/lib/NumberFormat/ComputeExponent.d.ts +0 -10
- package/lib/NumberFormat/ComputeExponent.js +0 -34
- package/lib/NumberFormat/ComputeExponentForMagnitude.d.ts +0 -8
- package/lib/NumberFormat/ComputeExponentForMagnitude.js +0 -65
- package/lib/NumberFormat/CurrencyDigits.d.ts +0 -6
- package/lib/NumberFormat/CurrencyDigits.js +0 -10
- package/lib/NumberFormat/FormatApproximately.d.ts +0 -5
- package/lib/NumberFormat/FormatApproximately.js +0 -9
- package/lib/NumberFormat/FormatNumeric.d.ts +0 -3
- package/lib/NumberFormat/FormatNumeric.js +0 -5
- package/lib/NumberFormat/FormatNumericRange.d.ts +0 -8
- package/lib/NumberFormat/FormatNumericRange.js +0 -11
- package/lib/NumberFormat/FormatNumericRangeToParts.d.ts +0 -8
- package/lib/NumberFormat/FormatNumericRangeToParts.js +0 -16
- package/lib/NumberFormat/FormatNumericToParts.d.ts +0 -5
- package/lib/NumberFormat/FormatNumericToParts.js +0 -14
- package/lib/NumberFormat/FormatNumericToString.d.ts +0 -9
- package/lib/NumberFormat/FormatNumericToString.js +0 -84
- package/lib/NumberFormat/GetUnsignedRoundingMode.d.ts +0 -2
- package/lib/NumberFormat/GetUnsignedRoundingMode.js +0 -28
- package/lib/NumberFormat/InitializeNumberFormat.d.ts +0 -12
- package/lib/NumberFormat/InitializeNumberFormat.js +0 -66
- package/lib/NumberFormat/PartitionNumberPattern.d.ts +0 -6
- package/lib/NumberFormat/PartitionNumberPattern.js +0 -126
- package/lib/NumberFormat/PartitionNumberRangePattern.d.ts +0 -8
- package/lib/NumberFormat/PartitionNumberRangePattern.js +0 -40
- package/lib/NumberFormat/SetNumberFormatDigitOptions.d.ts +0 -5
- package/lib/NumberFormat/SetNumberFormatDigitOptions.js +0 -179
- package/lib/NumberFormat/SetNumberFormatUnitOptions.d.ts +0 -5
- package/lib/NumberFormat/SetNumberFormatUnitOptions.js +0 -50
- package/lib/NumberFormat/ToRawFixed.d.ts +0 -9
- package/lib/NumberFormat/ToRawFixed.js +0 -119
- package/lib/NumberFormat/ToRawPrecision.d.ts +0 -9
- package/lib/NumberFormat/ToRawPrecision.js +0 -148
- package/lib/NumberFormat/digit-mapping.generated.d.ts +0 -1
- package/lib/NumberFormat/digit-mapping.generated.js +0 -782
- package/lib/NumberFormat/format_to_parts.d.ts +0 -24
- package/lib/NumberFormat/format_to_parts.js +0 -447
- package/lib/PartitionPattern.d.ts +0 -8
- package/lib/PartitionPattern.js +0 -35
- package/lib/SupportedLocales.d.ts +0 -9
- package/lib/SupportedLocales.js +0 -20
- package/lib/ToIntlMathematicalValue.d.ts +0 -2
- package/lib/ToIntlMathematicalValue.js +0 -27
- package/lib/constants.d.ts +0 -4
- package/lib/constants.js +0 -4
- package/lib/data.d.ts +0 -5
- package/lib/data.js +0 -13
- package/lib/index.d.ts +0 -47
- package/lib/index.js +0 -45
- package/lib/regex.generated.d.ts +0 -1
- package/lib/regex.generated.js +0 -2
- package/lib/types/core.d.ts +0 -10
- package/lib/types/core.js +0 -1
- package/lib/types/date-time.d.ts +0 -135
- package/lib/types/date-time.js +0 -6
- package/lib/types/displaynames.d.ts +0 -65
- package/lib/types/displaynames.js +0 -1
- package/lib/types/list.d.ts +0 -18
- package/lib/types/list.js +0 -1
- package/lib/types/number.d.ts +0 -173
- package/lib/types/number.js +0 -1
- package/lib/types/plural-rules.d.ts +0 -16
- package/lib/types/plural-rules.js +0 -1
- package/lib/types/relative-time.d.ts +0 -40
- package/lib/types/relative-time.js +0 -1
- package/lib/utils.d.ts +0 -30
- package/lib/utils.js +0 -135
package/index.d.ts
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
export * from './CanonicalizeLocaleList';
|
|
2
|
-
export * from './CanonicalizeTimeZoneName';
|
|
3
|
-
export * from './CoerceOptionsToObject';
|
|
4
|
-
export * from './GetNumberOption';
|
|
5
|
-
export * from './GetOption';
|
|
6
|
-
export * from './GetOptionsObject';
|
|
7
|
-
export * from './GetStringOrBooleanOption';
|
|
8
|
-
export * from './IsSanctionedSimpleUnitIdentifier';
|
|
9
|
-
export * from './IsValidTimeZoneName';
|
|
10
|
-
export * from './IsWellFormedCurrencyCode';
|
|
11
|
-
export * from './IsWellFormedUnitIdentifier';
|
|
12
|
-
export * from './NumberFormat/ApplyUnsignedRoundingMode';
|
|
13
|
-
export * from './NumberFormat/CollapseNumberRange';
|
|
14
|
-
export * from './NumberFormat/ComputeExponent';
|
|
15
|
-
export * from './NumberFormat/ComputeExponentForMagnitude';
|
|
16
|
-
export * from './NumberFormat/CurrencyDigits';
|
|
17
|
-
export { default as _formatToParts } from './NumberFormat/format_to_parts';
|
|
18
|
-
export * from './NumberFormat/FormatApproximately';
|
|
19
|
-
export * from './NumberFormat/FormatNumeric';
|
|
20
|
-
export * from './NumberFormat/FormatNumericRange';
|
|
21
|
-
export * from './NumberFormat/FormatNumericRangeToParts';
|
|
22
|
-
export * from './NumberFormat/FormatNumericToParts';
|
|
23
|
-
export * from './NumberFormat/FormatNumericToString';
|
|
24
|
-
export * from './NumberFormat/GetUnsignedRoundingMode';
|
|
25
|
-
export * from './NumberFormat/InitializeNumberFormat';
|
|
26
|
-
export * from './NumberFormat/PartitionNumberPattern';
|
|
27
|
-
export * from './NumberFormat/PartitionNumberRangePattern';
|
|
28
|
-
export * from './NumberFormat/SetNumberFormatDigitOptions';
|
|
29
|
-
export * from './NumberFormat/SetNumberFormatUnitOptions';
|
|
30
|
-
export * from './NumberFormat/ToRawFixed';
|
|
31
|
-
export * from './NumberFormat/ToRawPrecision';
|
|
32
|
-
export * from './PartitionPattern';
|
|
33
|
-
export * from './SupportedLocales';
|
|
34
|
-
export { createDataProperty, defineProperty, getInternalSlot, getMultiInternalSlots, isLiteralPart, setInternalSlot, setMultiInternalSlots, } from './utils';
|
|
35
|
-
export type { LiteralPart } from './utils';
|
|
36
|
-
export * from './262';
|
|
37
|
-
export { isMissingLocaleDataError } from './data';
|
|
38
|
-
export type { LocaleData } from './types/core';
|
|
39
|
-
export * from './types/date-time';
|
|
40
|
-
export * from './types/displaynames';
|
|
41
|
-
export * from './types/list';
|
|
42
|
-
export * from './types/number';
|
|
43
|
-
export * from './types/plural-rules';
|
|
44
|
-
export * from './types/relative-time';
|
|
45
|
-
export { createMemoizedDateTimeFormat, createMemoizedListFormat, createMemoizedLocale, createMemoizedNumberFormat, createMemoizedPluralRules, invariant, } from './utils';
|
|
46
|
-
export { ZERO } from './constants';
|
|
47
|
-
export { ToIntlMathematicalValue } from './ToIntlMathematicalValue';
|
|
1
|
+
export * from './CanonicalizeLocaleList.js';
|
|
2
|
+
export * from './CanonicalizeTimeZoneName.js';
|
|
3
|
+
export * from './CoerceOptionsToObject.js';
|
|
4
|
+
export * from './GetNumberOption.js';
|
|
5
|
+
export * from './GetOption.js';
|
|
6
|
+
export * from './GetOptionsObject.js';
|
|
7
|
+
export * from './GetStringOrBooleanOption.js';
|
|
8
|
+
export * from './IsSanctionedSimpleUnitIdentifier.js';
|
|
9
|
+
export * from './IsValidTimeZoneName.js';
|
|
10
|
+
export * from './IsWellFormedCurrencyCode.js';
|
|
11
|
+
export * from './IsWellFormedUnitIdentifier.js';
|
|
12
|
+
export * from './NumberFormat/ApplyUnsignedRoundingMode.js';
|
|
13
|
+
export * from './NumberFormat/CollapseNumberRange.js';
|
|
14
|
+
export * from './NumberFormat/ComputeExponent.js';
|
|
15
|
+
export * from './NumberFormat/ComputeExponentForMagnitude.js';
|
|
16
|
+
export * from './NumberFormat/CurrencyDigits.js';
|
|
17
|
+
export { default as _formatToParts } from './NumberFormat/format_to_parts.js';
|
|
18
|
+
export * from './NumberFormat/FormatApproximately.js';
|
|
19
|
+
export * from './NumberFormat/FormatNumeric.js';
|
|
20
|
+
export * from './NumberFormat/FormatNumericRange.js';
|
|
21
|
+
export * from './NumberFormat/FormatNumericRangeToParts.js';
|
|
22
|
+
export * from './NumberFormat/FormatNumericToParts.js';
|
|
23
|
+
export * from './NumberFormat/FormatNumericToString.js';
|
|
24
|
+
export * from './NumberFormat/GetUnsignedRoundingMode.js';
|
|
25
|
+
export * from './NumberFormat/InitializeNumberFormat.js';
|
|
26
|
+
export * from './NumberFormat/PartitionNumberPattern.js';
|
|
27
|
+
export * from './NumberFormat/PartitionNumberRangePattern.js';
|
|
28
|
+
export * from './NumberFormat/SetNumberFormatDigitOptions.js';
|
|
29
|
+
export * from './NumberFormat/SetNumberFormatUnitOptions.js';
|
|
30
|
+
export * from './NumberFormat/ToRawFixed.js';
|
|
31
|
+
export * from './NumberFormat/ToRawPrecision.js';
|
|
32
|
+
export * from './PartitionPattern.js';
|
|
33
|
+
export * from './SupportedLocales.js';
|
|
34
|
+
export { createDataProperty, defineProperty, getInternalSlot, getMultiInternalSlots, isLiteralPart, setInternalSlot, setMultiInternalSlots, } from './utils.js';
|
|
35
|
+
export type { LiteralPart } from './utils.js';
|
|
36
|
+
export * from './262.js';
|
|
37
|
+
export { isMissingLocaleDataError } from './data.js';
|
|
38
|
+
export type { LocaleData } from './types/core.js';
|
|
39
|
+
export * from './types/date-time.js';
|
|
40
|
+
export * from './types/displaynames.js';
|
|
41
|
+
export * from './types/list.js';
|
|
42
|
+
export * from './types/number.js';
|
|
43
|
+
export * from './types/plural-rules.js';
|
|
44
|
+
export * from './types/relative-time.js';
|
|
45
|
+
export { createMemoizedDateTimeFormat, createMemoizedListFormat, createMemoizedLocale, createMemoizedNumberFormat, createMemoizedPluralRules, invariant, } from './utils.js';
|
|
46
|
+
export { ZERO } from './constants.js';
|
|
47
|
+
export { ToIntlMathematicalValue } from './ToIntlMathematicalValue.js';
|
package/index.js
CHANGED
|
@@ -1,66 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Object.defineProperty(exports, "setMultiInternalSlots", { enumerable: true, get: function () { return utils_1.setMultiInternalSlots; } });
|
|
47
|
-
tslib_1.__exportStar(require("./262"), exports);
|
|
48
|
-
var data_1 = require("./data");
|
|
49
|
-
Object.defineProperty(exports, "isMissingLocaleDataError", { enumerable: true, get: function () { return data_1.isMissingLocaleDataError; } });
|
|
50
|
-
tslib_1.__exportStar(require("./types/date-time"), exports);
|
|
51
|
-
tslib_1.__exportStar(require("./types/displaynames"), exports);
|
|
52
|
-
tslib_1.__exportStar(require("./types/list"), exports);
|
|
53
|
-
tslib_1.__exportStar(require("./types/number"), exports);
|
|
54
|
-
tslib_1.__exportStar(require("./types/plural-rules"), exports);
|
|
55
|
-
tslib_1.__exportStar(require("./types/relative-time"), exports);
|
|
56
|
-
var utils_2 = require("./utils");
|
|
57
|
-
Object.defineProperty(exports, "createMemoizedDateTimeFormat", { enumerable: true, get: function () { return utils_2.createMemoizedDateTimeFormat; } });
|
|
58
|
-
Object.defineProperty(exports, "createMemoizedListFormat", { enumerable: true, get: function () { return utils_2.createMemoizedListFormat; } });
|
|
59
|
-
Object.defineProperty(exports, "createMemoizedLocale", { enumerable: true, get: function () { return utils_2.createMemoizedLocale; } });
|
|
60
|
-
Object.defineProperty(exports, "createMemoizedNumberFormat", { enumerable: true, get: function () { return utils_2.createMemoizedNumberFormat; } });
|
|
61
|
-
Object.defineProperty(exports, "createMemoizedPluralRules", { enumerable: true, get: function () { return utils_2.createMemoizedPluralRules; } });
|
|
62
|
-
Object.defineProperty(exports, "invariant", { enumerable: true, get: function () { return utils_2.invariant; } });
|
|
63
|
-
var constants_1 = require("./constants");
|
|
64
|
-
Object.defineProperty(exports, "ZERO", { enumerable: true, get: function () { return constants_1.ZERO; } });
|
|
65
|
-
var ToIntlMathematicalValue_1 = require("./ToIntlMathematicalValue");
|
|
66
|
-
Object.defineProperty(exports, "ToIntlMathematicalValue", { enumerable: true, get: function () { return ToIntlMathematicalValue_1.ToIntlMathematicalValue; } });
|
|
1
|
+
export * from './CanonicalizeLocaleList.js';
|
|
2
|
+
export * from './CanonicalizeTimeZoneName.js';
|
|
3
|
+
export * from './CoerceOptionsToObject.js';
|
|
4
|
+
export * from './GetNumberOption.js';
|
|
5
|
+
export * from './GetOption.js';
|
|
6
|
+
export * from './GetOptionsObject.js';
|
|
7
|
+
export * from './GetStringOrBooleanOption.js';
|
|
8
|
+
export * from './IsSanctionedSimpleUnitIdentifier.js';
|
|
9
|
+
export * from './IsValidTimeZoneName.js';
|
|
10
|
+
export * from './IsWellFormedCurrencyCode.js';
|
|
11
|
+
export * from './IsWellFormedUnitIdentifier.js';
|
|
12
|
+
export * from './NumberFormat/ApplyUnsignedRoundingMode.js';
|
|
13
|
+
export * from './NumberFormat/CollapseNumberRange.js';
|
|
14
|
+
export * from './NumberFormat/ComputeExponent.js';
|
|
15
|
+
export * from './NumberFormat/ComputeExponentForMagnitude.js';
|
|
16
|
+
export * from './NumberFormat/CurrencyDigits.js';
|
|
17
|
+
export { default as _formatToParts } from './NumberFormat/format_to_parts.js';
|
|
18
|
+
export * from './NumberFormat/FormatApproximately.js';
|
|
19
|
+
export * from './NumberFormat/FormatNumeric.js';
|
|
20
|
+
export * from './NumberFormat/FormatNumericRange.js';
|
|
21
|
+
export * from './NumberFormat/FormatNumericRangeToParts.js';
|
|
22
|
+
export * from './NumberFormat/FormatNumericToParts.js';
|
|
23
|
+
export * from './NumberFormat/FormatNumericToString.js';
|
|
24
|
+
export * from './NumberFormat/GetUnsignedRoundingMode.js';
|
|
25
|
+
export * from './NumberFormat/InitializeNumberFormat.js';
|
|
26
|
+
export * from './NumberFormat/PartitionNumberPattern.js';
|
|
27
|
+
export * from './NumberFormat/PartitionNumberRangePattern.js';
|
|
28
|
+
export * from './NumberFormat/SetNumberFormatDigitOptions.js';
|
|
29
|
+
export * from './NumberFormat/SetNumberFormatUnitOptions.js';
|
|
30
|
+
export * from './NumberFormat/ToRawFixed.js';
|
|
31
|
+
export * from './NumberFormat/ToRawPrecision.js';
|
|
32
|
+
export * from './PartitionPattern.js';
|
|
33
|
+
export * from './SupportedLocales.js';
|
|
34
|
+
export { createDataProperty, defineProperty, getInternalSlot, getMultiInternalSlots, isLiteralPart, setInternalSlot, setMultiInternalSlots, } from './utils.js';
|
|
35
|
+
export * from './262.js';
|
|
36
|
+
export { isMissingLocaleDataError } from './data.js';
|
|
37
|
+
export * from './types/date-time.js';
|
|
38
|
+
export * from './types/displaynames.js';
|
|
39
|
+
export * from './types/list.js';
|
|
40
|
+
export * from './types/number.js';
|
|
41
|
+
export * from './types/plural-rules.js';
|
|
42
|
+
export * from './types/relative-time.js';
|
|
43
|
+
export { createMemoizedDateTimeFormat, createMemoizedListFormat, createMemoizedLocale, createMemoizedNumberFormat, createMemoizedPluralRules, invariant, } from './utils.js';
|
|
44
|
+
export { ZERO } from './constants.js';
|
|
45
|
+
export { ToIntlMathematicalValue } from './ToIntlMathematicalValue.js';
|
package/package.json
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/ecma402-abstract",
|
|
3
3
|
"description": "A collection of implementation for ECMAScript abstract operations",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"author": "Long Ho <holevietlong@gmail.com",
|
|
6
6
|
"bugs": "https://github.com/formatjs/formatjs/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@formatjs/fast-memoize": "
|
|
9
|
-
"@formatjs/intl-localematcher": "0.
|
|
8
|
+
"@formatjs/fast-memoize": "3.0.0",
|
|
9
|
+
"@formatjs/intl-localematcher": "0.7.0",
|
|
10
10
|
"decimal.js": "^10.4.3",
|
|
11
11
|
"tslib": "^2.8.0"
|
|
12
12
|
},
|
|
13
|
+
"exports": {
|
|
14
|
+
".": "./index.js"
|
|
15
|
+
},
|
|
13
16
|
"gitHead": "a7842673d8ad205171ad7c8cb8bb2f318b427c0c",
|
|
14
17
|
"homepage": "https://github.com/formatjs/formatjs",
|
|
15
18
|
"keywords": [
|
|
@@ -24,9 +27,8 @@
|
|
|
24
27
|
"relative"
|
|
25
28
|
],
|
|
26
29
|
"license": "MIT",
|
|
27
|
-
"main": "index.js",
|
|
28
|
-
"module": "lib/index.js",
|
|
29
30
|
"repository": "git@github.com:formatjs/formatjs.git",
|
|
30
31
|
"sideEffects": false,
|
|
32
|
+
"type": "module",
|
|
31
33
|
"types": "index.d.ts"
|
|
32
34
|
}
|
package/regex.generated.js
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.S_UNICODE_REGEX = void 0;
|
|
4
1
|
// @generated from regex-gen.ts
|
|
5
|
-
|
|
2
|
+
export var S_UNICODE_REGEX = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/;
|
package/types/core.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/types/date-time.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RangePatternType = void 0;
|
|
4
|
-
var RangePatternType;
|
|
1
|
+
export var RangePatternType;
|
|
5
2
|
(function (RangePatternType) {
|
|
6
3
|
RangePatternType["startRange"] = "startRange";
|
|
7
4
|
RangePatternType["shared"] = "shared";
|
|
8
5
|
RangePatternType["endRange"] = "endRange";
|
|
9
|
-
})(RangePatternType || (
|
|
6
|
+
})(RangePatternType || (RangePatternType = {}));
|
package/types/displaynames.d.ts
CHANGED
package/types/displaynames.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/types/list.d.ts
CHANGED
package/types/list.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/types/number.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Decimal from 'decimal.js';
|
|
2
|
-
import { LocaleData } from './core';
|
|
3
|
-
import { LDMLPluralRule } from './plural-rules';
|
|
1
|
+
import { Decimal } from 'decimal.js';
|
|
2
|
+
import { LocaleData } from './core.js';
|
|
3
|
+
import { LDMLPluralRule } from './plural-rules.js';
|
|
4
4
|
export type NumberFormatNotation = 'standard' | 'scientific' | 'engineering' | 'compact';
|
|
5
5
|
export type RoundingPriorityType = 'auto' | 'morePrecision' | 'lessPrecision';
|
|
6
6
|
export type NumberFormatRoundingType = 'morePrecision' | 'lessPrecision' | 'significantDigits' | 'fractionDigits';
|
package/types/number.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/types/plural-rules.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LocaleData } from './core';
|
|
2
|
-
import { NumberFormatDigitInternalSlots } from './number';
|
|
1
|
+
import { LocaleData } from './core.js';
|
|
2
|
+
import { NumberFormatDigitInternalSlots } from './number.js';
|
|
3
3
|
export type LDMLPluralRule = 'zero' | 'one' | 'two' | 'few' | 'many' | 'other';
|
|
4
4
|
export interface PluralRulesData {
|
|
5
5
|
categories: {
|
package/types/plural-rules.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/types/relative-time.d.ts
CHANGED
package/types/relative-time.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/utils.js
CHANGED
|
@@ -1,44 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.repeat = repeat;
|
|
5
|
-
exports.setInternalSlot = setInternalSlot;
|
|
6
|
-
exports.setMultiInternalSlots = setMultiInternalSlots;
|
|
7
|
-
exports.getInternalSlot = getInternalSlot;
|
|
8
|
-
exports.getMultiInternalSlots = getMultiInternalSlots;
|
|
9
|
-
exports.isLiteralPart = isLiteralPart;
|
|
10
|
-
exports.defineProperty = defineProperty;
|
|
11
|
-
exports.createDataProperty = createDataProperty;
|
|
12
|
-
exports.invariant = invariant;
|
|
13
|
-
var tslib_1 = require("tslib");
|
|
14
|
-
var fast_memoize_1 = require("@formatjs/fast-memoize");
|
|
15
|
-
function repeat(s, times) {
|
|
1
|
+
import { __spreadArray } from "tslib";
|
|
2
|
+
import { memoize, strategies } from '@formatjs/fast-memoize';
|
|
3
|
+
export function repeat(s, times) {
|
|
16
4
|
if (typeof s.repeat === 'function') {
|
|
17
5
|
return s.repeat(times);
|
|
18
6
|
}
|
|
19
|
-
var arr =
|
|
7
|
+
var arr = Array.from({ length: times });
|
|
20
8
|
for (var i = 0; i < arr.length; i++) {
|
|
21
9
|
arr[i] = s;
|
|
22
10
|
}
|
|
23
11
|
return arr.join('');
|
|
24
12
|
}
|
|
25
|
-
function setInternalSlot(map, pl, field, value) {
|
|
13
|
+
export function setInternalSlot(map, pl, field, value) {
|
|
26
14
|
if (!map.get(pl)) {
|
|
27
15
|
map.set(pl, Object.create(null));
|
|
28
16
|
}
|
|
29
17
|
var slots = map.get(pl);
|
|
30
18
|
slots[field] = value;
|
|
31
19
|
}
|
|
32
|
-
function setMultiInternalSlots(map, pl, props) {
|
|
20
|
+
export function setMultiInternalSlots(map, pl, props) {
|
|
33
21
|
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
|
|
34
22
|
var k = _a[_i];
|
|
35
23
|
setInternalSlot(map, pl, k, props[k]);
|
|
36
24
|
}
|
|
37
25
|
}
|
|
38
|
-
function getInternalSlot(map, pl, field) {
|
|
26
|
+
export function getInternalSlot(map, pl, field) {
|
|
39
27
|
return getMultiInternalSlots(map, pl, field)[field];
|
|
40
28
|
}
|
|
41
|
-
function getMultiInternalSlots(map, pl) {
|
|
29
|
+
export function getMultiInternalSlots(map, pl) {
|
|
42
30
|
var fields = [];
|
|
43
31
|
for (var _i = 2; _i < arguments.length; _i++) {
|
|
44
32
|
fields[_i - 2] = arguments[_i];
|
|
@@ -52,7 +40,7 @@ function getMultiInternalSlots(map, pl) {
|
|
|
52
40
|
return all;
|
|
53
41
|
}, Object.create(null));
|
|
54
42
|
}
|
|
55
|
-
function isLiteralPart(patternPart) {
|
|
43
|
+
export function isLiteralPart(patternPart) {
|
|
56
44
|
return patternPart.type === 'literal';
|
|
57
45
|
}
|
|
58
46
|
/*
|
|
@@ -65,7 +53,7 @@ function isLiteralPart(patternPart) {
|
|
|
65
53
|
object, if it exists, has the attributes { [[Writable]]: false,
|
|
66
54
|
[[Enumerable]]: false, [[Configurable]]: true }.
|
|
67
55
|
*/
|
|
68
|
-
function defineProperty(target, name, _a) {
|
|
56
|
+
export function defineProperty(target, name, _a) {
|
|
69
57
|
var value = _a.value;
|
|
70
58
|
Object.defineProperty(target, name, {
|
|
71
59
|
configurable: true,
|
|
@@ -80,7 +68,7 @@ function defineProperty(target, name, _a) {
|
|
|
80
68
|
* @param name
|
|
81
69
|
* @param value
|
|
82
70
|
*/
|
|
83
|
-
function createDataProperty(target, name, value) {
|
|
71
|
+
export function createDataProperty(target, name, value) {
|
|
84
72
|
Object.defineProperty(target, name, {
|
|
85
73
|
configurable: true,
|
|
86
74
|
enumerable: true,
|
|
@@ -88,60 +76,60 @@ function createDataProperty(target, name, value) {
|
|
|
88
76
|
value: value,
|
|
89
77
|
});
|
|
90
78
|
}
|
|
91
|
-
|
|
92
|
-
function invariant(condition, message, Err) {
|
|
79
|
+
export var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;
|
|
80
|
+
export function invariant(condition, message, Err) {
|
|
93
81
|
if (Err === void 0) { Err = Error; }
|
|
94
82
|
if (!condition) {
|
|
95
83
|
throw new Err(message);
|
|
96
84
|
}
|
|
97
85
|
}
|
|
98
|
-
|
|
86
|
+
export var createMemoizedNumberFormat = memoize(function () {
|
|
99
87
|
var _a;
|
|
100
88
|
var args = [];
|
|
101
89
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
102
90
|
args[_i] = arguments[_i];
|
|
103
91
|
}
|
|
104
|
-
return new ((_a = Intl.NumberFormat).bind.apply(_a,
|
|
92
|
+
return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
105
93
|
}, {
|
|
106
|
-
strategy:
|
|
94
|
+
strategy: strategies.variadic,
|
|
107
95
|
});
|
|
108
|
-
|
|
96
|
+
export var createMemoizedDateTimeFormat = memoize(function () {
|
|
109
97
|
var _a;
|
|
110
98
|
var args = [];
|
|
111
99
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
112
100
|
args[_i] = arguments[_i];
|
|
113
101
|
}
|
|
114
|
-
return new ((_a = Intl.DateTimeFormat).bind.apply(_a,
|
|
102
|
+
return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
115
103
|
}, {
|
|
116
|
-
strategy:
|
|
104
|
+
strategy: strategies.variadic,
|
|
117
105
|
});
|
|
118
|
-
|
|
106
|
+
export var createMemoizedPluralRules = memoize(function () {
|
|
119
107
|
var _a;
|
|
120
108
|
var args = [];
|
|
121
109
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
122
110
|
args[_i] = arguments[_i];
|
|
123
111
|
}
|
|
124
|
-
return new ((_a = Intl.PluralRules).bind.apply(_a,
|
|
112
|
+
return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
125
113
|
}, {
|
|
126
|
-
strategy:
|
|
114
|
+
strategy: strategies.variadic,
|
|
127
115
|
});
|
|
128
|
-
|
|
116
|
+
export var createMemoizedLocale = memoize(function () {
|
|
129
117
|
var _a;
|
|
130
118
|
var args = [];
|
|
131
119
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
132
120
|
args[_i] = arguments[_i];
|
|
133
121
|
}
|
|
134
|
-
return new ((_a = Intl.Locale).bind.apply(_a,
|
|
122
|
+
return new ((_a = Intl.Locale).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
135
123
|
}, {
|
|
136
|
-
strategy:
|
|
124
|
+
strategy: strategies.variadic,
|
|
137
125
|
});
|
|
138
|
-
|
|
126
|
+
export var createMemoizedListFormat = memoize(function () {
|
|
139
127
|
var _a;
|
|
140
128
|
var args = [];
|
|
141
129
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
142
130
|
args[_i] = arguments[_i];
|
|
143
131
|
}
|
|
144
|
-
return new ((_a = Intl.ListFormat).bind.apply(_a,
|
|
132
|
+
return new ((_a = Intl.ListFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
145
133
|
}, {
|
|
146
|
-
strategy:
|
|
134
|
+
strategy: strategies.variadic,
|
|
147
135
|
});
|
package/lib/262.d.ts
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { Decimal } from 'decimal.js';
|
|
2
|
-
/**
|
|
3
|
-
* https://tc39.es/ecma262/#sec-tostring
|
|
4
|
-
*/
|
|
5
|
-
export declare function ToString(o: unknown): string;
|
|
6
|
-
/**
|
|
7
|
-
* https://tc39.es/ecma262/#sec-tonumber
|
|
8
|
-
* @param val
|
|
9
|
-
*/
|
|
10
|
-
export declare function ToNumber(arg: any): Decimal;
|
|
11
|
-
/**
|
|
12
|
-
* https://tc39.es/ecma262/#sec-timeclip
|
|
13
|
-
* @param time
|
|
14
|
-
*/
|
|
15
|
-
export declare function TimeClip(time: Decimal): Decimal;
|
|
16
|
-
/**
|
|
17
|
-
* https://tc39.es/ecma262/#sec-toobject
|
|
18
|
-
* @param arg
|
|
19
|
-
*/
|
|
20
|
-
export declare function ToObject<T>(arg: T): T extends null ? never : T extends undefined ? never : T;
|
|
21
|
-
/**
|
|
22
|
-
* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-samevalue
|
|
23
|
-
* @param x
|
|
24
|
-
* @param y
|
|
25
|
-
*/
|
|
26
|
-
export declare function SameValue(x: any, y: any): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-arraycreate
|
|
29
|
-
* @param len
|
|
30
|
-
*/
|
|
31
|
-
export declare function ArrayCreate<T = any>(len: number): T[];
|
|
32
|
-
/**
|
|
33
|
-
* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-hasownproperty
|
|
34
|
-
* @param o
|
|
35
|
-
* @param prop
|
|
36
|
-
*/
|
|
37
|
-
export declare function HasOwnProperty(o: object, prop: string): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-type
|
|
40
|
-
* @param x
|
|
41
|
-
*/
|
|
42
|
-
export declare function Type(x: any): 'Null' | 'Undefined' | 'Object' | 'Number' | 'Boolean' | 'String' | 'Symbol' | 'BigInt' | undefined;
|
|
43
|
-
/**
|
|
44
|
-
* https://tc39.es/ecma262/#eqn-Day
|
|
45
|
-
* @param t
|
|
46
|
-
*/
|
|
47
|
-
export declare function Day(t: number): number;
|
|
48
|
-
/**
|
|
49
|
-
* https://tc39.es/ecma262/#sec-week-day
|
|
50
|
-
* @param t
|
|
51
|
-
*/
|
|
52
|
-
export declare function WeekDay(t: number): number;
|
|
53
|
-
/**
|
|
54
|
-
* https://tc39.es/ecma262/#sec-year-number
|
|
55
|
-
* @param y
|
|
56
|
-
*/
|
|
57
|
-
export declare function DayFromYear(y: number): number;
|
|
58
|
-
/**
|
|
59
|
-
* https://tc39.es/ecma262/#sec-year-number
|
|
60
|
-
* @param y
|
|
61
|
-
*/
|
|
62
|
-
export declare function TimeFromYear(y: number): number;
|
|
63
|
-
/**
|
|
64
|
-
* https://tc39.es/ecma262/#sec-year-number
|
|
65
|
-
* @param t
|
|
66
|
-
*/
|
|
67
|
-
export declare function YearFromTime(t: number): number;
|
|
68
|
-
export declare function DaysInYear(y: number): 365 | 366;
|
|
69
|
-
export declare function DayWithinYear(t: number): number;
|
|
70
|
-
export declare function InLeapYear(t: number): 0 | 1;
|
|
71
|
-
/**
|
|
72
|
-
* https://tc39.es/ecma262/#sec-month-number
|
|
73
|
-
* @param t
|
|
74
|
-
*/
|
|
75
|
-
export declare function MonthFromTime(t: number): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
76
|
-
export declare function DateFromTime(t: number): number;
|
|
77
|
-
export declare function HourFromTime(t: number): number;
|
|
78
|
-
export declare function MinFromTime(t: number): number;
|
|
79
|
-
export declare function SecFromTime(t: number): number;
|
|
80
|
-
/**
|
|
81
|
-
* The abstract operation OrdinaryHasInstance implements
|
|
82
|
-
* the default algorithm for determining if an object O
|
|
83
|
-
* inherits from the instance object inheritance path
|
|
84
|
-
* provided by constructor C.
|
|
85
|
-
* @param C class
|
|
86
|
-
* @param O object
|
|
87
|
-
* @param internalSlots internalSlots
|
|
88
|
-
*/
|
|
89
|
-
export declare function OrdinaryHasInstance(C: Object, O: any, internalSlots?: {
|
|
90
|
-
boundTargetFunction: any;
|
|
91
|
-
}): boolean;
|
|
92
|
-
export declare function msFromTime(t: number): number;
|
|
93
|
-
export declare function ToPrimitive<T extends 'string' | 'number' = 'string' | 'number'>(input: any, preferredType: T): string | number | boolean | undefined | null;
|