Created
October 11, 2013 18:31
-
-
Save jonkemp/6939721 to your computer and use it in GitHub Desktop.
Checks a string to see if it is empty. Returns false if it finds anything other than white space in a string. Otherwise it returns true.
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
function isEmpty(val) { | |
return (!/\S/.test(val)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment