where.js 289 B

1234567891011
  1. define(['./filter', './matcher'], function (filter, matcher) {
  2. // Convenience version of a common use case of `_.filter`: selecting only
  3. // objects containing specific `key:value` pairs.
  4. function where(obj, attrs) {
  5. return filter(obj, matcher(attrs));
  6. }
  7. return where;
  8. });