SHARE
TWEET

Untitled

a guest Dec 2nd, 2014 171 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Assumes you're using either .apply or this is used as a member function
  2. function containsAll(predicates) {
  3.   var collection = this;
  4.   _.filter(collection, function(item) {
  5.     for (var i = 0, L = predicates.length; i < L; i++) {
  6.       if (!predicates[i](item) return false;
  7.     }
  8.     return true;
  9.   });
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top