where.js 279 B

12345678
  1. import filter from './filter.js';
  2. import matcher from './matcher.js';
  3. // Convenience version of a common use case of `_.filter`: selecting only
  4. // objects containing specific `key:value` pairs.
  5. export default function where(obj, attrs) {
  6. return filter(obj, matcher(attrs));
  7. }