Nodejs String Empty Check isBlank()

Here you can find the source of isBlank()

Method Source Code

String.prototype.isBlank = function() { 
   return !this.match(/\S/) 
}

Related

  1. isEmpty()
    String.prototype.isEmpty = function() {
        return (this.length === 0 || !this.trim());
    };
    
  2. isEmpty()
    String.prototype.isEmpty = function(){
        if(typeof this !== 'string') {
            if(typeof this === 'object' && !(this instanceof String)){
                throw {
                    name: 'InvalidType',
                    message: 'The current type is not a String'
        return this.length === 0;
    };
    
  3. isEmpty()
    String.prototype.isEmpty = function() {
      var rtn = (this == null || this == undefined || this.trim() == '');
      return rtn;
    };
    
  4. isEmpty(pattern)
    String.prototype.isEmpty = function(pattern) {
      return this == '';
    };
    
  5. isEmpty(str)
    String.isEmpty = function(str){
        if(typeof str === 'string'){
            str = str.trim();
        switch(str){
            case "":
            case 0:
            case null:
            case false:
    ...
    
  6. isBlank()
    String.prototype.isBlank = function() {
      return (!this || /^\s*$/.test(this));
    };
    
  7. isBlank()
    String.prototype.isBlank = function() {
        return (this==null || this=="");
    
  8. isBlank()
    String.prototype.isBlank = function (){
      var str = $.trim(this);
      if(str == "") {
        return true;
      } else {
        return false;
    
  9. 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;
    ...