Here you can find the source of isEmpty()
String.prototype.isEmpty = function () { "use strict";//from w ww .ja v a 2 s .c o m return (this.length === 0 || !this.trim()); };
String.prototype.isEmpty = function() { return this == null || this == ''; }; RegExp.escape = function(val) { return val.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); };
String.prototype.isEmpty = function() { return (!this.length)
String.prototype.isEmpty = function() { return this.toString().trim() == ""; };
String.prototype.isEmpty = function() { return (!this || 0 === this.length); };
String.prototype.isEmpty = function() { return (this == ''); };
String.prototype.isEmpty=function(){ return this.trim()==""; };
String.prototype.isEmpty = function () { return (!this || this == "[object Null]" || this == "" || this == "undefined");
String.prototype.isEmpty = function() { return this.trim() === "";
String.prototype.isEmpty = function(){ return (this === null || this === ''); };