is-numeric
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -5,6 +5,6 @@ (function(root) { | ||
function isNumeric(v) { | ||
if (typeof v === 'number') return true; | ||
var s = (v||'').toString(); | ||
if (!s) return false; | ||
return !isNaN(s); | ||
if (typeof v === 'number' && !isNaN(v)) return true; | ||
v = (v||'').toString(); | ||
if (!v) return false; | ||
return !isNaN(v); | ||
} | ||
@@ -11,0 +11,0 @@ |
{ | ||
"name": "is-numeric", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Predicate that returns true for numeric values.", | ||
@@ -5,0 +5,0 @@ "main": "is-numeric.js", |
4341