liudong
2023-05-29 340f156319b863525e50e900c58e59b86ecb3d5e
1
2
3
4
5
6
7
8
9
10
11
import extendOwn from './extendOwn.js';
import isMatch from './isMatch.js';
 
// Returns a predicate for checking whether an object has a given set of
// `key:value` pairs.
export default function matcher(attrs) {
  attrs = extendOwn({}, attrs);
  return function(obj) {
    return isMatch(obj, attrs);
  };
}