* The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`, * without support for callback shorthands and `this` binding, which iterates * over `collection` using the provided `eachFunc`. * * @private * @param {Array|Object|string} collection The c
(collection, predicate, eachFunc, retKey)
| 3481 | * @returns {*} Returns the found element or its key, else `undefined`. |
| 3482 | */ |
| 3483 | function baseFind(collection, predicate, eachFunc, retKey) { |
| 3484 | var result; |
| 3485 | eachFunc(collection, function(value, key, collection) { |
| 3486 | if (predicate(value, key, collection)) { |
| 3487 | result = retKey ? key : value; |
| 3488 | return false; |
| 3489 | } |
| 3490 | }); |
| 3491 | return result; |
| 3492 | } |
| 3493 | |
| 3494 | /** |
| 3495 | * The base implementation of `_.flatten` with added support for restricting |
no outgoing calls
no test coverage detected