Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Assumes you're using either .apply or this is used as a member function
- function containsAll(predicates) {
- var collection = this;
- _.filter(collection, function(item) {
- for (var i = 0, L = predicates.length; i < L; i++) {
- if (!predicates[i](item) return false;
- }
- return true;
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment