Skip to content

Instantly share code, notes, and snippets.

@Vladmel1234
Created October 26, 2016 09:36
Show Gist options
  • Save Vladmel1234/2f86b74ffcbb2059b2e54a318c2d43ca to your computer and use it in GitHub Desktop.
Save Vladmel1234/2f86b74ffcbb2059b2e54a318c2d43ca to your computer and use it in GitHub Desktop.
For checking if a string is blank or contains only white-space:
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