No Description

matcher.js 327B

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