@exodus/currency
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -61,3 +61,7 @@ "use strict"; | ||
num = num.toString(); | ||
} else num = num.toLowerCase(); | ||
} else if (typeof num === 'string') { | ||
num = num.toLowerCase(); | ||
} else { | ||
throw new TypeError(`Invalid number type '${typeof num}'`); | ||
} | ||
if (num.length > 2 && num[0] === '0' && num[1] === 'x') { | ||
@@ -179,2 +183,5 @@ num = num.slice(2); | ||
var _num$isBigIntWrapper2, _num; | ||
if (NumberUnit.isNumberUnit(num)) { | ||
throw new TypeError(`NumberUnit.mul does not support NumberUnit as argument.`); | ||
} | ||
if (_bigint.default.isUnderlyingInstance(num)) { | ||
@@ -186,3 +193,2 @@ num = _bigint.default.wrap(num); | ||
} | ||
if (NumberUnit.isNumberUnit(num)) (0, _deprecationWarning.maybeReportDifferentTypesDeprecated)(this, num, 'mul'); | ||
const { | ||
@@ -201,6 +207,8 @@ number, | ||
div(num) { | ||
if (NumberUnit.isNumberUnit(num)) { | ||
throw new TypeError(`NumberUnit.div does not support NumberUnit as argument.`); | ||
} | ||
if (_bigint.default.isUnderlyingInstance(num)) { | ||
return new NumberUnit(this._number.div(num), this.unit); | ||
} | ||
if (NumberUnit.isNumberUnit(num)) (0, _deprecationWarning.maybeReportDifferentTypesDeprecated)(this, num, 'div'); | ||
const { | ||
@@ -207,0 +215,0 @@ number, |
{ | ||
"name": "@exodus/currency", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Currency support.", | ||
@@ -38,3 +38,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "2b50c73001838ff0344bfefcd9e0c103aa9f1d9d" | ||
"gitHead": "2cfbbf40c8d6b7a3bace9b457ef4f40b8cd8a376" | ||
} |
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
52008
845