index.js
function _matchAllFields(fields, matchAnyRegex) {
        var regExp = regExps ? matchAnyRegex ? regExps.any : regExps.all : null;
        if (regExp) {
            for (var i = 0; i < fields.length; ++i) {
                parentBuilder.field(fields[i]).is("$regex", regExp);
            }
        }
        return parentBuilder;
    }
function _matchAllFields(fields, matchAnyRegex) {
        var regExp = regExps ? matchAnyRegex ? regExps.any : regExps.all : null;
        if (regExp) {
            for (var i = 0; i < fields.length; ++i) {
                parentBuilder.field(fields[i]).is("$regex", regExp);
            }
        }
        return parentBuilder;
    }
function _matchAllFields ( fields , matchAnyRegex ) { var regExp = regExps ? matchAnyRegex ? regExps . any : regExps . all : null ; if ( regExp ) { for ( var i = 0 ; i < fields . length ; ++ i ) { parentBuilder . field ( fields [ i ] ) . is ( "$regex" , regExp ) ; } } return parentBuilder ; }
Matches the given Regular expression with all the fields.
@param {Array.<string>} fields Array of document fields.
@param {boolean} [matchAnyRegex=false] If true, match any
of the search query tokens, else match all.
@returns {QueryBuilder} the parent Builder.
@private
Matches the given Regular expression with all the fields .