Skip to content

Instantly share code, notes, and snippets.

@bendc
Last active October 26, 2015 08:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bendc/8f7b242f7a48fc5974d2 to your computer and use it in GitHub Desktop.
Save bendc/8f7b242f7a48fc5974d2 to your computer and use it in GitHub Desktop.
isNumber() checks if its argument represents a numeric value
const isNumber = x =>
!Number.isNaN(parseInt(x)) && Number.isInteger(Math.trunc(x));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment