Created
November 28, 2014 10:54
-
-
Save kkoziarski/25ac04d3f3311ac4a7b8 to your computer and use it in GitHub Desktop.
IsNumber
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isInt(input) { | |
return !isNaN(input) && parseInt(input) == input; | |
//(parseFloat(value) == parseInt(value)) | |
} | |
function isNumber(input) { | |
return !isNaN(parseFloat(input)) && isFinite(input); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment