@hestia-earth/utils
Advanced tools
Comparing version 0.10.19 to 0.10.20
@@ -10,3 +10,4 @@ "use strict"; | ||
var mult = Math.pow(10, precision - Math.floor(Math.log(n < 0 ? -n : n) / Math.LN10) - 1); | ||
return n === 0 ? 0 : Math.round(n * mult) / mult; | ||
var multiplier = +("" + mult).replace(/[0]([1-9])\1+/g, function (v) { return "" + (+(v.substring(0, 1)) + 1); }); | ||
return n === 0 ? 0 : Math.round(n * multiplier) / multiplier; | ||
}; | ||
@@ -13,0 +14,0 @@ exports.toPrecision = toPrecision; |
{ | ||
"name": "@hestia-earth/utils", | ||
"version": "0.10.19", | ||
"version": "0.10.20", | ||
"description": "Hestia Utils library", | ||
@@ -35,3 +35,3 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@hestia-earth/glossary": "^0.2.5", | ||
"@hestia-earth/glossary": "^0.3.0", | ||
"@types/chai": "^4.2.21", | ||
@@ -54,4 +54,4 @@ "@types/mocha": "^7.0.2", | ||
"peerDependencies": { | ||
"@hestia-earth/glossary": "^0.2.5" | ||
"@hestia-earth/glossary": "^0.3.0" | ||
} | ||
} |
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
28513
590