Skip to content

Instantly share code, notes, and snippets.

@abdihaikal
Created January 19, 2019 12:16
Show Gist options
  • Save abdihaikal/28ede69200c6b14fd09f31de56240710 to your computer and use it in GitHub Desktop.
Save abdihaikal/28ede69200c6b14fd09f31de56240710 to your computer and use it in GitHub Desktop.
Method checks whether its argument represents a numeric value.
function isNumeric(value) {
return !isNaN(parseFloat(value)) && isFinite(value) && 'number' === typeof value && value === Number(parseFloat(value));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment