Here you can find the source of isEmpty()
String.prototype.isEmpty = function() { return (this.length === 0 || !this.trim()); };
String.prototype.isNullOrEmpty = function () { return this === null || this.length === 0; };
function isNullOrEmptyString(obj) { if (isNullOrUnderdefined(obj)) return false; if (isStringType(obj)) { return obj.length == 0; return false;
String.prototype.isNullOrWhitespace = function () { return this === null || this.replace(/\s/g, '').length === 0; };
String.isNullOrWhitespace = function( input ) { return !input || !input.trim(); };
String.prototype.isEmpty = function() { return this == ''; };
"use strict"; String.prototype.isEmpty = function() { return (this.length === 0 || !this.trim()); };
String.prototype.isEmpty = function() { 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)