UNPKG

underscore

Version:

JavaScript's functional programming helper library.

9 lines (7 loc) 279 B
import filter from './filter.js'; import matcher from './matcher.js'; // Convenience version of a common use case of `_.filter`: selecting only // objects containing specific `key:value` pairs. export default function where(obj, attrs) { return filter(obj, matcher(attrs)); }