@naturalcycles/js-lib 15.79.1 → 15.80.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/dist/intl/intl.d.ts +2 -0
- package/dist/intl/intl.js +12 -0
- package/package.json +1 -1
- package/src/intl/intl.ts +13 -0
package/dist/intl/intl.d.ts
CHANGED
|
@@ -16,11 +16,13 @@ declare class MemoizedIntl {
|
|
|
16
16
|
getTimezone(): IANATimezone;
|
|
17
17
|
DateTimeFormat(locales: Intl.LocalesArgument, options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat;
|
|
18
18
|
RelativeTimeFormat(locales: Intl.LocalesArgument, options: Intl.RelativeTimeFormatOptions): Intl.RelativeTimeFormat;
|
|
19
|
+
DurationFormat(locales: Intl.LocalesArgument, options: Intl.DurationFormatOptions): Intl.DurationFormat;
|
|
19
20
|
NumberFormat(locales: Intl.LocalesArgument, options: Intl.NumberFormatOptions): Intl.NumberFormat;
|
|
20
21
|
Collator(locales: Intl.LocalesArgument, options: Intl.CollatorOptions): Intl.Collator;
|
|
21
22
|
PluralRules(locales: Intl.LocalesArgument, options: Intl.PluralRulesOptions): Intl.PluralRules;
|
|
22
23
|
ListFormat(locales: Intl.LocalesArgument, options: Intl.ListFormatOptions): Intl.ListFormat;
|
|
23
24
|
DisplayNames(locales: Intl.LocalesArgument, options: Intl.DisplayNamesOptions): Intl.DisplayNames;
|
|
25
|
+
Segmenter(locales: Intl.LocalesArgument, options: Intl.SegmenterOptions): Intl.Segmenter;
|
|
24
26
|
}
|
|
25
27
|
export declare const Intl2: MemoizedIntl;
|
|
26
28
|
export {};
|
package/dist/intl/intl.js
CHANGED
|
@@ -24,6 +24,9 @@ class MemoizedIntl {
|
|
|
24
24
|
RelativeTimeFormat(locales, options) {
|
|
25
25
|
return new Intl.RelativeTimeFormat(locales, options);
|
|
26
26
|
}
|
|
27
|
+
DurationFormat(locales, options) {
|
|
28
|
+
return new Intl.DurationFormat(locales, options);
|
|
29
|
+
}
|
|
27
30
|
NumberFormat(locales, options) {
|
|
28
31
|
return new Intl.NumberFormat(locales, options);
|
|
29
32
|
}
|
|
@@ -39,6 +42,9 @@ class MemoizedIntl {
|
|
|
39
42
|
DisplayNames(locales, options) {
|
|
40
43
|
return new Intl.DisplayNames(locales, options);
|
|
41
44
|
}
|
|
45
|
+
Segmenter(locales, options) {
|
|
46
|
+
return new Intl.Segmenter(locales, options);
|
|
47
|
+
}
|
|
42
48
|
}
|
|
43
49
|
__decorate([
|
|
44
50
|
_Memo()
|
|
@@ -49,6 +55,9 @@ __decorate([
|
|
|
49
55
|
__decorate([
|
|
50
56
|
_Memo()
|
|
51
57
|
], MemoizedIntl.prototype, "RelativeTimeFormat", null);
|
|
58
|
+
__decorate([
|
|
59
|
+
_Memo()
|
|
60
|
+
], MemoizedIntl.prototype, "DurationFormat", null);
|
|
52
61
|
__decorate([
|
|
53
62
|
_Memo()
|
|
54
63
|
], MemoizedIntl.prototype, "NumberFormat", null);
|
|
@@ -64,4 +73,7 @@ __decorate([
|
|
|
64
73
|
__decorate([
|
|
65
74
|
_Memo()
|
|
66
75
|
], MemoizedIntl.prototype, "DisplayNames", null);
|
|
76
|
+
__decorate([
|
|
77
|
+
_Memo()
|
|
78
|
+
], MemoizedIntl.prototype, "Segmenter", null);
|
|
67
79
|
export const Intl2 = new MemoizedIntl();
|
package/package.json
CHANGED
package/src/intl/intl.ts
CHANGED
|
@@ -38,6 +38,14 @@ class MemoizedIntl {
|
|
|
38
38
|
return new Intl.RelativeTimeFormat(locales, options)
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
@_Memo()
|
|
42
|
+
DurationFormat(
|
|
43
|
+
locales: Intl.LocalesArgument,
|
|
44
|
+
options: Intl.DurationFormatOptions,
|
|
45
|
+
): Intl.DurationFormat {
|
|
46
|
+
return new Intl.DurationFormat(locales, options)
|
|
47
|
+
}
|
|
48
|
+
|
|
41
49
|
@_Memo()
|
|
42
50
|
NumberFormat(
|
|
43
51
|
locales: Intl.LocalesArgument,
|
|
@@ -68,6 +76,11 @@ class MemoizedIntl {
|
|
|
68
76
|
): Intl.DisplayNames {
|
|
69
77
|
return new Intl.DisplayNames(locales, options)
|
|
70
78
|
}
|
|
79
|
+
|
|
80
|
+
@_Memo()
|
|
81
|
+
Segmenter(locales: Intl.LocalesArgument, options: Intl.SegmenterOptions): Intl.Segmenter {
|
|
82
|
+
return new Intl.Segmenter(locales, options)
|
|
83
|
+
}
|
|
71
84
|
}
|
|
72
85
|
|
|
73
86
|
export const Intl2 = new MemoizedIntl()
|