where.js 295 B

12345678910
  1. var filter = require('./filter.js');
  2. var matcher = require('./matcher.js');
  3. // Convenience version of a common use case of `_.filter`: selecting only
  4. // objects containing specific `key:value` pairs.
  5. function where(obj, attrs) {
  6. return filter(obj, matcher(attrs));
  7. }
  8. module.exports = where;