@formatjs/intl-unified-numberformat
Advanced tools
Comparing version 0.5.2 to 1.0.0
@@ -6,2 +6,24 @@ # Change Log | ||
# [1.0.0](https://github.com/formatjs/formatjs/compare/@formatjs/intl-unified-numberformat@0.5.2...@formatjs/intl-unified-numberformat@1.0.0) (2019-09-20) | ||
### Bug Fixes | ||
* **@formatjs/intl-relativetimeformat:** add more side-effectful files ([03d2a10](https://github.com/formatjs/formatjs/commit/03d2a10)) | ||
* **@formatjs/intl-unified-numberformat:** rm side effects array due to build complication ([499df4f](https://github.com/formatjs/formatjs/commit/499df4f)) | ||
### Features | ||
* **@formatjs/intl-unified-numberformat:** mark the package as side-effects free ([d05c293](https://github.com/formatjs/formatjs/commit/d05c293)) | ||
### BREAKING CHANGES | ||
* **@formatjs/intl-unified-numberformat:** This package no longer comes with `en` by default | ||
## [0.5.2](https://github.com/formatjs/formatjs/compare/@formatjs/intl-unified-numberformat@0.5.1...@formatjs/intl-unified-numberformat@0.5.2) (2019-09-17) | ||
@@ -8,0 +30,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var core_1 = require("./core"); | ||
var en_1 = require("./en"); | ||
core_1.UnifiedNumberFormat.__addUnitLocaleData(en_1.default); | ||
if (!core_1.isUnitSupported('bit')) { | ||
Intl.NumberFormat = core_1.UnifiedNumberFormat; | ||
} |
@@ -7,14 +7,2 @@ (function (global, factory) { | ||
var __assign = (undefined && undefined.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
/* @generated */ | ||
@@ -83,4 +71,4 @@ // prettier-ignore | ||
var __assign$1 = (undefined && undefined.__assign) || function () { | ||
__assign$1 = Object.assign || function(t) { | ||
var __assign = (undefined && undefined.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
@@ -93,3 +81,3 @@ s = arguments[i]; | ||
}; | ||
return __assign$1.apply(this, arguments); | ||
return __assign.apply(this, arguments); | ||
}; | ||
@@ -136,3 +124,3 @@ var __rest = (undefined && undefined.__rest) || function (s, e) { | ||
dataToMerge.reverse(); | ||
return dataToMerge.reduce(function (all, d) { return (__assign$1(__assign$1({}, all), ((d && d.units && d.units[unit]) || {}))); }, { | ||
return dataToMerge.reduce(function (all, d) { return (__assign(__assign({}, all), ((d && d.units && d.units[unit]) || {}))); }, { | ||
displayName: unit, | ||
@@ -164,3 +152,3 @@ long: {}, | ||
} | ||
this.nf = new NativeNumberFormat(locales, __assign$1(__assign$1({}, options), { style: style === 'unit' ? 'decimal' : style })); | ||
this.nf = new NativeNumberFormat(locales, __assign(__assign({}, options), { style: style === 'unit' ? 'decimal' : style })); | ||
this.pl = new Intl.PluralRules(locales); | ||
@@ -167,0 +155,0 @@ this.locale = this.nf.resolvedOptions().locale; |
import { UnifiedNumberFormat, isUnitSupported } from './core'; | ||
import en from './en'; | ||
UnifiedNumberFormat.__addUnitLocaleData(en); | ||
if (!isUnitSupported('bit')) { | ||
Intl.NumberFormat = UnifiedNumberFormat; | ||
} |
{ | ||
"name": "@formatjs/intl-unified-numberformat", | ||
"version": "0.5.2", | ||
"version": "1.0.0", | ||
"description": "Ponyfill for intl unified numberformat proposal", | ||
@@ -22,7 +22,7 @@ "keywords": [ | ||
"devDependencies": { | ||
"@formatjs/intl-pluralrules": "^1.1.5", | ||
"formatjs-extract-cldr-data": "^9.7.1" | ||
"@formatjs/intl-pluralrules": "^1.2.0", | ||
"formatjs-extract-cldr-data": "^9.7.2" | ||
}, | ||
"dependencies": { | ||
"@formatjs/intl-utils": "^1.1.1" | ||
"@formatjs/intl-utils": "^1.2.0" | ||
}, | ||
@@ -40,3 +40,3 @@ "scripts": { | ||
}, | ||
"gitHead": "f275221512d2d7e8af4a10a0230a505922fcaf31" | ||
"gitHead": "3e5b09cafdf3b136d7f0f828bf4d56fa0c1a6f2c" | ||
} |
import {UnifiedNumberFormat, isUnitSupported} from './core'; | ||
import en from './en'; | ||
UnifiedNumberFormat.__addUnitLocaleData(en); | ||
if (!isUnitSupported('bit')) { | ||
Intl.NumberFormat = UnifiedNumberFormat as any; | ||
} |
Sorry, the diff of this file is too big to display
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
15662592
246
32801
Updated@formatjs/intl-utils@^1.2.0