@formatjs/ecma402-abstract
Advanced tools
Comparing version 1.2.0 to 1.2.1
// /home/longlho/.cache/bazel/_bazel_longlho/576c18efaac10246ec115c72af79fca6/sandbox/linux-sandbox/714/execroot/formatjs/node_modules/@bazel/typescript/internal/ts_project_options_validator.js checked attributes for //packages/ecma402-abstract:dist-base | ||
// /home/longlho/.cache/bazel/_bazel_longlho/576c18efaac10246ec115c72af79fca6/sandbox/linux-sandbox/2/execroot/formatjs/node_modules/@bazel/typescript/internal/ts_project_options_validator.js checked attributes for //packages/ecma402-abstract:dist-base | ||
// composite: false | ||
@@ -9,1 +9,2 @@ // declaration: true | ||
// emit_declaration_only: false | ||
// ts_build_info_file: |
// /home/longlho/.cache/bazel/_bazel_longlho/576c18efaac10246ec115c72af79fca6/sandbox/linux-sandbox/716/execroot/formatjs/node_modules/@bazel/typescript/internal/ts_project_options_validator.js checked attributes for //packages/ecma402-abstract:dist-esm | ||
// /home/longlho/.cache/bazel/_bazel_longlho/576c18efaac10246ec115c72af79fca6/sandbox/linux-sandbox/4/execroot/formatjs/node_modules/@bazel/typescript/internal/ts_project_options_validator.js checked attributes for //packages/ecma402-abstract:dist-esm | ||
// composite: false | ||
@@ -9,1 +9,2 @@ // declaration: true | ||
// emit_declaration_only: false | ||
// ts_build_info_file: |
@@ -10,5 +10,9 @@ "use strict"; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.invariant = exports.isMissingLocaleDataError = exports.unpackData = exports.getLocaleHierarchy = exports.defineProperty = exports.getMagnitude = exports.setMultiInternalSlots = exports.setInternalSlot = exports.isLiteralPart = exports.getMultiInternalSlots = exports.getInternalSlot = exports.parseDateTimeSkeleton = exports.DATE_TIME_PROPS = exports._formatToParts = exports.BestFitFormatMatcher = void 0; | ||
var BestFitFormatMatcher_1 = require("./src/DateTimeFormat/BestFitFormatMatcher"); | ||
@@ -56,3 +60,3 @@ Object.defineProperty(exports, "BestFitFormatMatcher", { enumerable: true, get: function () { return BestFitFormatMatcher_1.BestFitFormatMatcher; } }); | ||
var format_to_parts_1 = require("./src/NumberFormat/format_to_parts"); | ||
Object.defineProperty(exports, "_formatToParts", { enumerable: true, get: function () { return format_to_parts_1.default; } }); | ||
Object.defineProperty(exports, "_formatToParts", { enumerable: true, get: function () { return __importDefault(format_to_parts_1).default; } }); | ||
var utils_1 = require("./src/DateTimeFormat/utils"); | ||
@@ -59,0 +63,0 @@ Object.defineProperty(exports, "DATE_TIME_PROPS", { enumerable: true, get: function () { return utils_1.DATE_TIME_PROPS; } }); |
@@ -5,3 +5,3 @@ var __extends = (this && this.__extends) || (function () { | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
@@ -8,0 +8,0 @@ }; |
@@ -163,7 +163,3 @@ import { ToRawFixed } from './ToRawFixed'; | ||
if (currencyNameData) { | ||
unitName = selectPlural(pl, | ||
// NOTE: Google Chrome's Intl.NumberFormat uses the original number to determine the plurality, | ||
// but the mantissa for unit. We think this is a bug in ICU, but will still replicate the behavior. | ||
// TODO: use original number. | ||
numberResult.roundedNumber * Math.pow(10, exponent), currencyNameData.displayName); | ||
unitName = selectPlural(pl, numberResult.roundedNumber * Math.pow(10, exponent), currencyNameData.displayName); | ||
} | ||
@@ -205,3 +201,3 @@ else { | ||
// Simple unit pattern | ||
unitPattern = selectPlural(pl, numberResult.roundedNumber, data.units.simple[unit][unitDisplay]); | ||
unitPattern = selectPlural(pl, numberResult.roundedNumber * Math.pow(10, exponent), data.units.simple[unit][unitDisplay]); | ||
} | ||
@@ -214,3 +210,3 @@ else { | ||
unitData = data.units.simple[numeratorUnit]; | ||
var numeratorUnitPattern = selectPlural(pl, numberResult.roundedNumber, data.units.simple[numeratorUnit][unitDisplay]); | ||
var numeratorUnitPattern = selectPlural(pl, numberResult.roundedNumber * Math.pow(10, exponent), data.units.simple[numeratorUnit][unitDisplay]); | ||
var perUnitPattern = data.units.simple[denominatorUnit].perUnit[unitDisplay]; | ||
@@ -217,0 +213,0 @@ if (perUnitPattern) { |
@@ -106,3 +106,8 @@ export interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions { | ||
} | ||
export declare type UnpackedZoneData = [number, string, number, boolean]; | ||
export declare type UnpackedZoneData = [ | ||
number, | ||
string, | ||
number, | ||
boolean | ||
]; | ||
//# sourceMappingURL=date-time.d.ts.map |
{ | ||
"name": "@formatjs/ecma402-abstract", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "A collection of implementation for ECMAScript abstract operations", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -6,3 +6,3 @@ "use strict"; | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
@@ -9,0 +9,0 @@ }; |
@@ -17,3 +17,3 @@ "use strict"; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
@@ -185,7 +185,3 @@ return result; | ||
if (currencyNameData) { | ||
unitName = selectPlural(pl, | ||
// NOTE: Google Chrome's Intl.NumberFormat uses the original number to determine the plurality, | ||
// but the mantissa for unit. We think this is a bug in ICU, but will still replicate the behavior. | ||
// TODO: use original number. | ||
numberResult.roundedNumber * Math.pow(10, exponent), currencyNameData.displayName); | ||
unitName = selectPlural(pl, numberResult.roundedNumber * Math.pow(10, exponent), currencyNameData.displayName); | ||
} | ||
@@ -227,3 +223,3 @@ else { | ||
// Simple unit pattern | ||
unitPattern = selectPlural(pl, numberResult.roundedNumber, data.units.simple[unit][unitDisplay]); | ||
unitPattern = selectPlural(pl, numberResult.roundedNumber * Math.pow(10, exponent), data.units.simple[unit][unitDisplay]); | ||
} | ||
@@ -236,3 +232,3 @@ else { | ||
unitData = data.units.simple[numeratorUnit]; | ||
var numeratorUnitPattern = selectPlural(pl, numberResult.roundedNumber, data.units.simple[numeratorUnit][unitDisplay]); | ||
var numeratorUnitPattern = selectPlural(pl, numberResult.roundedNumber * Math.pow(10, exponent), data.units.simple[numeratorUnit][unitDisplay]); | ||
var perUnitPattern = data.units.simple[denominatorUnit].perUnit[unitDisplay]; | ||
@@ -239,0 +235,0 @@ if (perUnitPattern) { |
@@ -10,3 +10,3 @@ "use strict"; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
@@ -13,0 +13,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -106,3 +106,8 @@ export interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions { | ||
} | ||
export declare type UnpackedZoneData = [number, string, number, boolean]; | ||
export declare type UnpackedZoneData = [ | ||
number, | ||
string, | ||
number, | ||
boolean | ||
]; | ||
//# sourceMappingURL=date-time.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
442586
8700