UNPKG

react-collection-helpers

Version:
15 lines (11 loc) 373 B
import applyPredicateToCollectionWith from './apply-predicate-to-collection-with'; function efficientReject(collection, predicate) { var matches = []; for (var i = 0; i < collection.length; i += 1) { if (!predicate(collection[i])) { matches.push(collection[i]); } } return matches; } export default applyPredicateToCollectionWith(efficientReject);