Last active
August 29, 2015 14:07
-
-
Save MatthewVita/b0bbd13d2b539e6efb3c to your computer and use it in GitHub Desktop.
Empty.js - Convenience function, checks for "empty" values
This file contains 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
//@desc: Convenience function that | |
//checks for "empty" values | |
//@use: console.log(Empty('hello!')); //false | |
function Empty(val) { | |
return (typeof(val) === 'undefined' || typeof(val) === 'null' || val === '' || typeof(val) === 'NaN' || val === false); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment