Created
October 26, 2016 09:36
-
-
Save Vladmel1234/2f86b74ffcbb2059b2e54a318c2d43ca to your computer and use it in GitHub Desktop.
For checking if a string is blank or contains only white-space:
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
String.prototype.isEmpty = function() { | |
return (this.length === 0 || !this.trim()); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment