Created
April 25, 2012 11:56
-
-
Save karolk/2489201 to your computer and use it in GitHub Desktop.
check if a value is null, undefined empty string or an empty array
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
//returns true if [], '', null, undefined | |
//returns false if 0, false, {}, NaN | |
function isEmptyNullUndef(value) { | |
return [value] == ''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment