Created
November 13, 2013 01:23
-
-
Save gepser/7441982 to your computer and use it in GitHub Desktop.
Javascript function to determinate if some value is a number or not.
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 isNumeric(value){ | |
return typeof value === 'number' || !isNaN(Number(value.replace(/^\s*$/, 'a'))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment