Skip to content

Instantly share code, notes, and snippets.

@kkoziarski
Created November 28, 2014 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkoziarski/25ac04d3f3311ac4a7b8 to your computer and use it in GitHub Desktop.
Save kkoziarski/25ac04d3f3311ac4a7b8 to your computer and use it in GitHub Desktop.
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