static searchStringOn(search:String, value:String) {
    if (_.isEmpty(search)) {
      return true;
    }
    
    // to lower case, replace accents by the corresponding letter and then remove all non-alpha characters.
    const searchFormatted = Diacritics.replaceDiacritics(search.toLowerCase()).replace(/\W/g, '');
    const valueFormatted = Diacritics.replaceDiacritics(value.toLowerCase()).replace(/\W/g, '');

    return valueFormatted.indexOf(searchFormatted) >= 0;
  }
Exemple #2
0
        0.114 * (b * b)
      );

      if (hsp > 127.5) {
        return true;
      } else {
        return false;
      }
    },

    isDarkColor(color) {
      return !this.isLightColor(color);
    }

  },

  searchStringOn(search:String, value:String) {
    if (_.isEmpty(search) || _.isEmpty(value)) {
      return false;
    }

    // to lower case, replace accents by the corresponding letter and then
    // remove all non-alpha characters.
    const searchFormatted = Diacritics.replaceDiacritics(search.toLowerCase()).replace(/\W/g, '');
    const valueFormatted = Diacritics.replaceDiacritics(value.toLowerCase()).replace(/\W/g, '');

    return valueFormatted.indexOf(searchFormatted) >= 0;
  }

};