Closed
Description
Consider the following:
_(collection)
.filter(['some_id', someObj.id])
.filter(['some_token', anotherObj.token])
.filter(somePredicateFunction)
.value();
might as well be written as:
_(collection)
.filter(_.overEvery(
_.partial(_.matchesProperty, _, ['some_id', someObj.id]),
_.partial(_.matchesProperty, _, ['some_token', anotherObj.token]),
somePredicateFunction
)
.value();
or for readability as:
_(collection)
.filter(_.overEvery(
['some_id', someObj.id],
['some_token', anotherObj.token],
somePredicateFunction
)
.value();