@formatjs/icu-skeleton-parser 1.3.0 → 1.3.1
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/index.js +2 -2
- package/number.js +7 -7
- package/package.json +6 -1
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./date-time"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./number"), exports);
|
|
4
|
+
(0, tslib_1.__exportStar)(require("./date-time"), exports);
|
|
5
|
+
(0, tslib_1.__exportStar)(require("./number"), exports);
|
package/number.js
CHANGED
|
@@ -193,10 +193,10 @@ function parseNumberSkeleton(tokens) {
|
|
|
193
193
|
result.compactDisplay = 'long';
|
|
194
194
|
continue;
|
|
195
195
|
case 'scientific':
|
|
196
|
-
result = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (tslib_1.__assign(tslib_1.__assign({}, all), parseNotationOptions(opt))); }, {}));
|
|
196
|
+
result = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return ((0, tslib_1.__assign)((0, tslib_1.__assign)({}, all), parseNotationOptions(opt))); }, {}));
|
|
197
197
|
continue;
|
|
198
198
|
case 'engineering':
|
|
199
|
-
result = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (tslib_1.__assign(tslib_1.__assign({}, all), parseNotationOptions(opt))); }, {}));
|
|
199
|
+
result = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return ((0, tslib_1.__assign)((0, tslib_1.__assign)({}, all), parseNotationOptions(opt))); }, {}));
|
|
200
200
|
continue;
|
|
201
201
|
case 'notation-simple':
|
|
202
202
|
result.notation = 'standard';
|
|
@@ -274,25 +274,25 @@ function parseNumberSkeleton(tokens) {
|
|
|
274
274
|
var opt = token.options[0];
|
|
275
275
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
|
|
276
276
|
if (opt === 'w') {
|
|
277
|
-
result = tslib_1.__assign(tslib_1.__assign({}, result), { trailingZeroDisplay: 'stripIfInteger' });
|
|
277
|
+
result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), { trailingZeroDisplay: 'stripIfInteger' });
|
|
278
278
|
}
|
|
279
279
|
else if (opt) {
|
|
280
|
-
result = tslib_1.__assign(tslib_1.__assign({}, result), parseSignificantPrecision(opt));
|
|
280
|
+
result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), parseSignificantPrecision(opt));
|
|
281
281
|
}
|
|
282
282
|
continue;
|
|
283
283
|
}
|
|
284
284
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
|
|
285
285
|
if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {
|
|
286
|
-
result = tslib_1.__assign(tslib_1.__assign({}, result), parseSignificantPrecision(token.stem));
|
|
286
|
+
result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), parseSignificantPrecision(token.stem));
|
|
287
287
|
continue;
|
|
288
288
|
}
|
|
289
289
|
var signOpts = parseSign(token.stem);
|
|
290
290
|
if (signOpts) {
|
|
291
|
-
result = tslib_1.__assign(tslib_1.__assign({}, result), signOpts);
|
|
291
|
+
result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), signOpts);
|
|
292
292
|
}
|
|
293
293
|
var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);
|
|
294
294
|
if (conciseScientificAndEngineeringOpts) {
|
|
295
|
-
result = tslib_1.__assign(tslib_1.__assign({}, result), conciseScientificAndEngineeringOpts);
|
|
295
|
+
result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), conciseScientificAndEngineeringOpts);
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
return result;
|
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/icu-skeleton-parser",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"module": "lib/index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/formatjs/formatjs.git",
|
|
11
|
+
"directory": "packages/icu-skeleton-parser"
|
|
12
|
+
},
|
|
8
13
|
"dependencies": {
|
|
9
14
|
"@formatjs/ecma402-abstract": "1.10.0",
|
|
10
15
|
"tslib": "^2.1.0"
|