src/matcher.js
function matcher(match) {
  if (match instanceof RegExp) {
    return function(criteria) {
      return match.test(criteria);
    };
  }

  return function(criteria) {
    return criteria === match;
  };
}
function matcher(match) {
  if (match instanceof RegExp) {
    return function(criteria) {
      return match.test(criteria);
    };
  }

  return function(criteria) {
    return criteria === match;
  };
}
function matcher ( match ) { if ( match instanceof RegExp ) { return function ( criteria ) { return match . test ( criteria ) ; } ; } return function ( criteria ) { return criteria === match ; } ; }
Default matching rule with strict comparison. Or if the match is a regex
then the comparison is done by calling the `test` method on the regex.

@param {*} match - If the input is a regex, then matches will be done using
the regex itself. Otherwise, the comparison is done with strict comparison.

@returns {boolean}
Default matching rule with strict comparison . Or if the match is a regex then the comparison is done by calling the test method on the regex .