@formatjs/intl-durationformat
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
import { invariant } from '@formatjs/ecma402-abstract'; | ||
import { createMemoizedListFormat, createMemoizedNumberFormat, invariant, } from '@formatjs/ecma402-abstract'; | ||
import { TABLE_2 } from '../constants'; | ||
@@ -72,3 +72,3 @@ import { DurationFormat } from '../core'; | ||
} | ||
var nf = new Intl.NumberFormat(internalSlots.locale, nfOpts); | ||
var nf = createMemoizedNumberFormat(internalSlots.locale, nfOpts); | ||
var list_1; | ||
@@ -115,3 +115,3 @@ if (!separated) { | ||
lfOpts.style = listStyle; | ||
var lf = new Intl.ListFormat(internalSlots.locale, lfOpts); | ||
var lf = createMemoizedListFormat(internalSlots.locale, lfOpts); | ||
var strings = []; | ||
@@ -118,0 +118,0 @@ for (var _i = 0, result_1 = result; _i < result_1.length; _i++) { |
{ | ||
"name": "@formatjs/intl-durationformat", | ||
"version": "0.2.4", | ||
"version": "0.3.0", | ||
"description": "Intl.DurationFormat polyfill", | ||
@@ -29,5 +29,5 @@ "keywords": [ | ||
"tslib": "^2.4.0", | ||
"@formatjs/intl-localematcher": "0.5.4", | ||
"@formatjs/ecma402-abstract": "2.0.0" | ||
"@formatjs/ecma402-abstract": "2.1.0", | ||
"@formatjs/intl-localematcher": "0.5.4" | ||
} | ||
} |
@@ -75,3 +75,3 @@ "use strict"; | ||
} | ||
var nf = new Intl.NumberFormat(internalSlots.locale, nfOpts); | ||
var nf = (0, ecma402_abstract_1.createMemoizedNumberFormat)(internalSlots.locale, nfOpts); | ||
var list_1; | ||
@@ -118,3 +118,3 @@ if (!separated) { | ||
lfOpts.style = listStyle; | ||
var lf = new Intl.ListFormat(internalSlots.locale, lfOpts); | ||
var lf = (0, ecma402_abstract_1.createMemoizedListFormat)(internalSlots.locale, lfOpts); | ||
var strings = []; | ||
@@ -121,0 +121,0 @@ for (var _i = 0, result_1 = result; _i < result_1.length; _i++) { |
310174
0.04%+ Added
+ Added
- Removed