B2G/gecko/browser/devtools/webconsole/webconsole.js
/**
   * Check that the passed string matches the filter arguments.
   *
   * @param String aString
   *        to search for filter words in.
   * @param String aFilter
   *        is a string containing all of the words to filter on.
   * @returns boolean
   */
Check that the passed string matches the filter arguments.
@param String aString
to search for filter words in.
@param String aFilter
is a string containing all of the words to filter on.
@returns boolean
Check that the passed string matches the filter arguments . @param String aString to search for filter words in . @param String aFilter is a string containing all of the words to filter on . @returns boolean
function WCF_stringMatchesFilters(aString, aFilter)
  {
    if (!aFilter || !aString) {
      return true;
    }
    let searchStr = aString.toLowerCase();
    let filterStrings = aFilter.toLowerCase().split(/\s+/);
    return !filterStrings.some(function (f) {
      return searchStr.indexOf(f) == -1;
    });
  }
function WCF_stringMatchesFilters ( aString , aFilter ) { if ( ! aFilter || ! aString ) { return true ; } let searchStr = aString . toLowerCase ( ) ; let filterStrings = aFilter . toLowerCase ( ) . split ( / \s+ / ) ; return ! filterStrings . some ( function ( f ) { return searchStr . indexOf ( f ) == - 1 ; } ) ; }
Check that the passed string matches the filter arguments.
Check that the passed string matches the filter arguments .