Skip to content

Instantly share code, notes, and snippets.

@tavriaforever
Last active December 13, 2016 13:36
Show Gist options
  • Save tavriaforever/093ed5182d08167f58dc277061290016 to your computer and use it in GitHub Desktop.
Save tavriaforever/093ed5182d08167f58dc277061290016 to your computer and use it in GitHub Desktop.
function isNumber(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
}
if (isNumber(data.points) && data.points >= 0) { return 'blablabla'; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment