dynamic-typing
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -18,2 +18,5 @@ 'use strict'; | ||
let number = Number(value); | ||
if (number === 0 && !value.includes('0')) { | ||
return value; | ||
} | ||
if (!Number.isNaN(number)) return number; | ||
@@ -20,0 +23,0 @@ return value; |
{ | ||
"name": "dynamic-typing", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Dynamically type a string", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -14,4 +14,7 @@ /** | ||
let number = Number(value); | ||
if (number === 0 && !value.includes('0')) { | ||
return value; | ||
} | ||
if (!Number.isNaN(number)) return number; | ||
return value; | ||
} |
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
4548
40