Lines Matching defs:predicate

549    * @param {Function} predicate The function invoked per iteration.
550 * @returns {boolean} Returns `true` if all elements pass the predicate check,
553 function arrayEvery(array, predicate) {
558 if (!predicate(array[index], index, array)) {
571 * @param {Function} predicate The function invoked per iteration.
574 function arrayFilter(array, predicate) {
582 if (predicate(value, index, array)) {
717 * @param {Function} predicate The function invoked per iteration.
718 * @returns {boolean} Returns `true` if any element passes the predicate check,
721 function arraySome(array, predicate) {
726 if (predicate(array[index], index, array)) {
771 * @param {Function} predicate The function invoked per iteration.
775 function baseFindKey(collection, predicate, eachFunc) {
778 if (predicate(value, key, collection)) {
792 * @param {Function} predicate The function invoked per iteration.
797 function baseFindIndex(array, predicate, fromIndex, fromRight) {
802 if (predicate(array[index], index, array)) {
2726 predicate = source[key],
2729 if ((value === undefined && !(key in object)) || !predicate(value)) {
2834 * @param {Function} predicate The function invoked per iteration.
2835 * @returns {boolean} Returns `true` if all elements pass the predicate check,
2838 function baseEvery(collection, predicate) {
2841 result = !!predicate(value, index, collection);
2909 * @param {Function} predicate The function invoked per iteration.
2912 function baseFilter(collection, predicate) {
2915 if (predicate(value, index, collection)) {
2928 * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
2929 * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
2933 function baseFlatten(array, depth, predicate, isStrict, result) {
2937 predicate || (predicate = isFlattenable);
2942 if (depth > 0 && predicate(value)) {
2945 baseFlatten(value, depth - 1, predicate, isStrict, result);
3758 * @param {Function} predicate The function invoked per property.
3761 function basePickBy(object, paths, predicate) {
3770 if (predicate(value, path)) {
4071 * @param {Function} predicate The function invoked per iteration.
4072 * @returns {boolean} Returns `true` if any element passes the predicate check,
4075 function baseSome(collection, predicate) {
4079 result = predicate(value, index, collection);
4335 * @param {Function} predicate The function invoked per iteration.
4340 function baseWhile(array, predicate, isDrop, fromRight) {
4345 predicate(array[index], index, array)) {}
5052 return function(collection, predicate, fromIndex) {
5055 var iteratee = getIteratee(predicate, 3);
5057 predicate = function(key) { return iteratee(iterable[key], key, iterable); };
5059 var index = findIndexFunc(collection, predicate, fromIndex);
7093 * Elements are dropped until `predicate` returns falsey. The predicate is
7101 * @param {Function} [predicate=_.identity] The function invoked per iteration.
7126 function dropRightWhile(array, predicate) {
7128 ? baseWhile(array, getIteratee(predicate, 3), true, true)
7134 * Elements are dropped until `predicate` returns falsey. The predicate is
7142 * @param {Function} [predicate=_.identity] The function invoked per iteration.
7167 function dropWhile(array, predicate) {
7169 ? baseWhile(array, getIteratee(predicate, 3), true)
7216 * element `predicate` returns truthy for instead of the element itself.
7223 * @param {Function} [predicate=_.identity] The function invoked per iteration.
7249 function findIndex(array, predicate, fromIndex) {
7258 return baseFindIndex(array, getIteratee(predicate, 3), index);
7270 * @param {Function} [predicate=_.identity] The function invoked per iteration.
7296 function findLastIndex(array, predicate, fromIndex) {
7308 return baseFindIndex(array, getIteratee(predicate, 3), index, true);
7681 * to remove elements from an array by predicate.
7820 * Removes all elements from `array` that `predicate` returns truthy for
7821 * and returns an array of the removed elements. The predicate is invoked
7832 * @param {Function} [predicate=_.identity] The function invoked per iteration.
7847 function remove(array, predicate) {
7856 predicate = getIteratee(predicate, 3);
7859 if (predicate(value, index, array)) {
8214 * taken until `predicate` returns falsey. The predicate is invoked with
8222 * @param {Function} [predicate=_.identity] The function invoked per iteration.
8247 function takeRightWhile(array, predicate) {
8249 ? baseWhile(array, getIteratee(predicate, 3), false, true)
8255 * are taken until `predicate` returns falsey. The predicate is invoked with
8263 * @param {Function} [predicate=_.identity] The function invoked per iteration.
8288 function takeWhile(array, predicate) {
8290 ? baseWhile(array, getIteratee(predicate, 3))
9086 * Checks if `predicate` returns truthy for **all** elements of `collection`.
9087 * Iteration is stopped once `predicate` returns falsey. The predicate is
9100 * @param {Function} [predicate=_.identity] The function invoked per iteration.
9102 * @returns {boolean} Returns `true` if all elements pass the predicate check,
9126 function every(collection, predicate, guard) {
9128 if (guard && isIterateeCall(collection, predicate, guard)) {
9129 predicate = undefined;
9131 return func(collection, getIteratee(predicate, 3));
9136 * `predicate` returns truthy for. The predicate is invoked with three
9146 * @param {Function} [predicate=_.identity] The function invoked per iteration.
9171 function filter(collection, predicate) {
9173 return func(collection, getIteratee(predicate, 3));
9178 * `predicate` returns truthy for. The predicate is invoked with three
9186 * @param {Function} [predicate=_.identity] The function invoked per iteration.
9223 * @param {Function} [predicate=_.identity] The function invoked per iteration.
9602 * contains elements `predicate` returns truthy for, the second of which
9603 * contains elements `predicate` returns falsey for. The predicate is
9611 * @param {Function} [predicate=_.identity] The function invoked per iteration.
9715 * that `predicate` does **not** return truthy for.
9722 * @param {Function} [predicate=_.identity] The function invoked per iteration.
9747 function reject(collection, predicate) {
9749 return func(collection, negate(getIteratee(predicate, 3)));
9857 * Checks if `predicate` returns truthy for **any** element of `collection`.
9858 * Iteration is stopped once `predicate` returns truthy. The predicate is
9866 * @param {Function} [predicate=_.identity] The function invoked per iteration.
9868 * @returns {boolean} Returns `true` if any element passes the predicate check,
9892 function some(collection, predicate, guard) {
9894 if (guard && isIterateeCall(collection, predicate, guard)) {
9895 predicate = undefined;
9897 return func(collection, getIteratee(predicate, 3));
10564 * Creates a function that negates the result of the predicate `func`. The
10565 * `func` predicate is invoked with the `this` binding and arguments of the
10572 * @param {Function} predicate The predicate to negate.
10583 function negate(predicate) {
10584 if (typeof predicate != 'function') {
10590 case 0: return !predicate.call(this);
10591 case 1: return !predicate.call(this, args[0]);
10592 case 2: return !predicate.call(this, args[0], args[1]);
10593 case 3: return !predicate.call(this, args[0], args[1], args[2]);
10595 return !predicate.apply(this, args);
11125 * Checks if `object` conforms to `source` by invoking the predicate
12843 * element `predicate` returns truthy for instead of the element itself.
12850 * @param {Function} [predicate=_.identity] The function invoked per iteration.
12876 function findKey(object, predicate) {
12877 return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
12889 * @param {Function} [predicate=_.identity] The function invoked per iteration.
12915 function findLastKey(object, predicate) {
12916 return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
13521 * `predicate` doesn't return truthy for. The predicate is invoked with two
13529 * @param {Function} [predicate=_.identity] The function invoked per property.
13538 function omitBy(object, predicate) {
13539 return pickBy(object, negate(getIteratee(predicate)));
13564 * Creates an object composed of the `object` properties `predicate` returns
13565 * truthy for. The predicate is invoked with two arguments: (value, key).
13572 * @param {Function} [predicate=_.identity] The function invoked per property.
13581 function pickBy(object, predicate) {
13588 predicate = getIteratee(predicate);
13590 return predicate(value, path[0]);
15296 * function of the first predicate to return truthy. The predicate-function
15304 * @param {Array} pairs The predicate-function pairs.
15346 * Creates a function that invokes the predicate properties of `source` with
16931 LazyWrapper.prototype.find = function(predicate) {
16932 return this.filter(predicate).head();
16935 LazyWrapper.prototype.findLast = function(predicate) {
16936 return this.reverse().find(predicate);
16948 LazyWrapper.prototype.reject = function(predicate) {
16949 return this.filter(negate(getIteratee(predicate)));
16971 LazyWrapper.prototype.takeRightWhile = function(predicate) {
16972 return this.reverse().takeWhile(predicate).reverse();