@hestia-earth/utils
Advanced tools
Comparing version 0.10.24 to 0.10.25
@@ -5,3 +5,10 @@ "use strict"; | ||
exports.convertValue = exports.converters = exports.ConvertUnits = exports.toPrecision = exports.isNumber = void 0; | ||
var isNumber = function (n) { return !isNaN(parseFloat("" + n)) && isFinite(parseFloat("" + n)); }; | ||
var isNumber = function (n) { | ||
var _a; | ||
return [ | ||
(_a = /^(-)?[\d]+(e|e-)?[\d]+$/.exec(("" + n))) === null || _a === void 0 ? void 0 : _a.length, | ||
!isNaN(parseFloat("" + n)), | ||
isFinite(parseFloat("" + n)) | ||
].every(Boolean); | ||
}; | ||
exports.isNumber = isNumber; | ||
@@ -8,0 +15,0 @@ var toPrecision = function (n, precision) { |
@@ -27,2 +27,3 @@ "use strict"; | ||
.replace(/([0-9]{4})/g, function (g) { return "-" + g; }) | ||
.replace(/[\_\.]/g, '-') | ||
: null; | ||
@@ -29,0 +30,0 @@ }; |
{ | ||
"name": "@hestia-earth/utils", | ||
"version": "0.10.24", | ||
"version": "0.10.25", | ||
"description": "Hestia Utils library", | ||
@@ -35,3 +35,3 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@hestia-earth/glossary": "^0.3.0", | ||
"@hestia-earth/glossary": "^0.5.0", | ||
"@types/chai": "^4.2.21", | ||
@@ -54,4 +54,4 @@ "@types/mocha": "^7.0.2", | ||
"peerDependencies": { | ||
"@hestia-earth/glossary": "^0.3.0" | ||
"@hestia-earth/glossary": "^0.5.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
34235
738