Skip to content

Instantly share code, notes, and snippets.

@gepser
Created November 13, 2013 01:23
Show Gist options
  • Save gepser/7441982 to your computer and use it in GitHub Desktop.
Save gepser/7441982 to your computer and use it in GitHub Desktop.
Javascript function to determinate if some value is a number or not.
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