@formatjs/intl-durationformat 0.3.0 → 0.4.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/package.json +4 -4
- package/should-polyfill.js +1 -2
- package/src/abstract/DurationRecordSign.js +1 -2
- package/src/abstract/GetDurationUnitOptions.js +1 -2
- package/src/abstract/IsValidDurationRecord.js +1 -2
- package/src/abstract/PartitionDurationFormatPattern.js +1 -2
- package/src/abstract/ToDurationRecord.js +1 -2
- package/src/abstract/ToIntegerIfIntegral.js +1 -2
- package/src/get_internal_slots.js +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-durationformat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Intl.DurationFormat polyfill",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intl",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"url": "https://github.com/formatjs/formatjs/issues"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"tslib": "^2.
|
|
29
|
-
"@formatjs/
|
|
30
|
-
"@formatjs/
|
|
28
|
+
"tslib": "^2.7.0",
|
|
29
|
+
"@formatjs/intl-localematcher": "0.5.5",
|
|
30
|
+
"@formatjs/ecma402-abstract": "2.2.0"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/should-polyfill.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.shouldPolyfill =
|
|
3
|
+
exports.shouldPolyfill = shouldPolyfill;
|
|
4
4
|
function shouldPolyfill() {
|
|
5
5
|
return typeof Intl === 'undefined' || !('DurationFormat' in Intl);
|
|
6
6
|
}
|
|
7
|
-
exports.shouldPolyfill = shouldPolyfill;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DurationRecordSign =
|
|
3
|
+
exports.DurationRecordSign = DurationRecordSign;
|
|
4
4
|
var constants_1 = require("../constants");
|
|
5
5
|
function DurationRecordSign(record) {
|
|
6
6
|
for (var _i = 0, TABLE_1_1 = constants_1.TABLE_1; _i < TABLE_1_1.length; _i++) {
|
|
@@ -14,4 +14,3 @@ function DurationRecordSign(record) {
|
|
|
14
14
|
}
|
|
15
15
|
return 0;
|
|
16
16
|
}
|
|
17
|
-
exports.DurationRecordSign = DurationRecordSign;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetDurationUnitOptions =
|
|
3
|
+
exports.GetDurationUnitOptions = GetDurationUnitOptions;
|
|
4
4
|
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
5
|
function GetDurationUnitOptions(unit, options, baseStyle, stylesList, digitalBase, prevStyle) {
|
|
6
6
|
var style = (0, ecma402_abstract_1.GetOption)(options, unit, 'string', stylesList, undefined);
|
|
@@ -44,4 +44,3 @@ function GetDurationUnitOptions(unit, options, baseStyle, stylesList, digitalBas
|
|
|
44
44
|
display: display,
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
exports.GetDurationUnitOptions = GetDurationUnitOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IsValidDurationRecord =
|
|
3
|
+
exports.IsValidDurationRecord = IsValidDurationRecord;
|
|
4
4
|
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
5
|
var constants_1 = require("../constants");
|
|
6
6
|
var DurationRecordSign_1 = require("./DurationRecordSign");
|
|
@@ -19,4 +19,3 @@ function IsValidDurationRecord(record) {
|
|
|
19
19
|
}
|
|
20
20
|
return true;
|
|
21
21
|
}
|
|
22
|
-
exports.IsValidDurationRecord = IsValidDurationRecord;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PartitionDurationFormatPattern =
|
|
3
|
+
exports.PartitionDurationFormatPattern = PartitionDurationFormatPattern;
|
|
4
4
|
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
5
|
var constants_1 = require("../constants");
|
|
6
6
|
var core_1 = require("../core");
|
|
@@ -150,4 +150,3 @@ function PartitionDurationFormatPattern(df, duration) {
|
|
|
150
150
|
}
|
|
151
151
|
return flattened;
|
|
152
152
|
}
|
|
153
|
-
exports.PartitionDurationFormatPattern = PartitionDurationFormatPattern;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ToDurationRecord =
|
|
3
|
+
exports.ToDurationRecord = ToDurationRecord;
|
|
4
4
|
var IsValidDurationRecord_1 = require("./IsValidDurationRecord");
|
|
5
5
|
var ToIntegerIfIntegral_1 = require("./ToIntegerIfIntegral");
|
|
6
6
|
function ToDurationRecord(input) {
|
|
@@ -69,4 +69,3 @@ function ToDurationRecord(input) {
|
|
|
69
69
|
}
|
|
70
70
|
return result;
|
|
71
71
|
}
|
|
72
|
-
exports.ToDurationRecord = ToDurationRecord;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ToIntegerIfIntegral =
|
|
3
|
+
exports.ToIntegerIfIntegral = ToIntegerIfIntegral;
|
|
4
4
|
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
5
|
function ToIntegerIfIntegral(arg) {
|
|
6
6
|
var number = (0, ecma402_abstract_1.ToNumber)(arg);
|
|
@@ -9,4 +9,3 @@ function ToIntegerIfIntegral(arg) {
|
|
|
9
9
|
}
|
|
10
10
|
return number;
|
|
11
11
|
}
|
|
12
|
-
exports.ToIntegerIfIntegral = ToIntegerIfIntegral;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getInternalSlots =
|
|
3
|
+
exports.getInternalSlots = getInternalSlots;
|
|
4
4
|
var internalSlotMap = new WeakMap();
|
|
5
5
|
function getInternalSlots(x) {
|
|
6
6
|
var internalSlots = internalSlotMap.get(x);
|
|
@@ -10,4 +10,3 @@ function getInternalSlots(x) {
|
|
|
10
10
|
}
|
|
11
11
|
return internalSlots;
|
|
12
12
|
}
|
|
13
|
-
exports.getInternalSlots = getInternalSlots;
|