@formatjs/intl-durationformat
Advanced tools
Comparing version 0.6.5 to 0.7.0
@@ -1,8 +0,6 @@ | ||
import { ToNumber } from '@formatjs/ecma402-abstract'; | ||
import { invariant, ToNumber } from '@formatjs/ecma402-abstract'; | ||
export function ToIntegerIfIntegral(arg) { | ||
var number = ToNumber(arg); | ||
if (!Number.isInteger(number)) { | ||
throw new RangeError("".concat(arg, " is not an integer")); | ||
} | ||
return number; | ||
invariant(number.isInteger(), "".concat(arg, " is not an integer")); | ||
return number.toNumber(); | ||
} |
{ | ||
"name": "@formatjs/intl-durationformat", | ||
"version": "0.6.5", | ||
"version": "0.7.0", | ||
"description": "Intl.DurationFormat polyfill", | ||
@@ -29,5 +29,5 @@ "keywords": [ | ||
"tslib": "2", | ||
"@formatjs/ecma402-abstract": "2.2.5", | ||
"@formatjs/intl-localematcher": "0.5.8" | ||
"@formatjs/ecma402-abstract": "2.3.0", | ||
"@formatjs/intl-localematcher": "0.5.9" | ||
} | ||
} |
@@ -7,6 +7,4 @@ "use strict"; | ||
var number = (0, ecma402_abstract_1.ToNumber)(arg); | ||
if (!Number.isInteger(number)) { | ||
throw new RangeError("".concat(arg, " is not an integer")); | ||
} | ||
return number; | ||
(0, ecma402_abstract_1.invariant)(number.isInteger(), "".concat(arg, " is not an integer")); | ||
return number.toNumber(); | ||
} |
320875
13646
+ Added@formatjs/ecma402-abstract@2.3.0(transitive)
+ Added@formatjs/fast-memoize@2.2.5(transitive)
+ Added@formatjs/intl-localematcher@0.5.9(transitive)
+ Addeddecimal.js@10.4.3(transitive)
- Removed@formatjs/ecma402-abstract@2.2.5(transitive)
- Removed@formatjs/fast-memoize@2.2.4(transitive)
- Removed@formatjs/intl-localematcher@0.5.8(transitive)