Javascript String isEmpty(pattern)
/**//from ww w . ja v a 2s. c o m * String#empty() -> Boolean * * Checks if the string is empty. * * ##### Example * * ''.empty(); * //-> true * * ' '.empty(); * //-> false **/ String.prototype.isEmpty = function(pattern) { return this == ''; };