Last active
October 26, 2015 08:29
-
-
Save bendc/8f7b242f7a48fc5974d2 to your computer and use it in GitHub Desktop.
isNumber() checks if its argument represents a numeric value
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
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