List of utility methods to do String Empty Check
isBlank()String.prototype.isBlank = function() { if (this.trim().length == 0) return true; else return false; }; Date.prototype.toLocalDate = function() { var localTime = this.getTime(); var localOffset = this.getTimezoneOffset() * 60000; ... | |
isBlank()String.prototype.isBlank = function() { if (this == undefined || this == "" || this == null || /^\s*$/.test(this)) { return true; return false; }; | |
isBlank()String.prototype.isBlank = function() try var value = this.toString().trim(); if (value == null) return true; if (value.length == 0) return true; else ... | |
isBlank(pattern)String.prototype.isBlank = function(pattern) { return /^\s*$/.test(this); }; |