findWhere.js 297 B

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