Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
IsNumber
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