MCPcopy
hub / github.com/stemkoski/stemkoski.github.com / reject

Function reject

MathBox/mathbox-bundle.js:38948–38953  ·  view source on GitHub ↗

* The opposite of `_.filter` this method returns the elements of a * collection that the callback does **not** return truey for. * * If a property name is provided for `callback` the created "_.pluck" style * callback will return the property value of the given element. *

(collection, callback, thisArg)

Source from the content-addressed store, hash-verified

38946 * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }]
38947 */
38948 function reject(collection, callback, thisArg) {
38949 callback = lodash.createCallback(callback, thisArg, 3);
38950 return filter(collection, function(value, index, collection) {
38951 return !callback(value, index, collection);
38952 });
38953 }
38954
38955 /**
38956 * Retrieves a random element or `n` random elements from a collection.

Callers

nothing calls this directly

Calls 2

filterFunction · 0.85
callbackFunction · 0.70

Tested by

no test coverage detected