1
2
3
4
5
6
7
8
9
10
11
12
13
14
| define(['./extendOwn', './isMatch'], function (extendOwn, isMatch) {
|
| // Returns a predicate for checking whether an object has a given set of
| // `key:value` pairs.
| function matcher(attrs) {
| attrs = extendOwn({}, attrs);
| return function(obj) {
| return isMatch(obj, attrs);
| };
| }
|
| return matcher;
|
| });
|
|