2 * The base implementation of methods like `_.findKey` and `_.findLastKey`,
3 * without support for iteratee shorthands, which iterates over `collection`
7 * @param {Array|Object} collection The collection to inspect.
8 * @param {Function} predicate The function invoked per iteration.
9 * @param {Function} eachFunc The function to iterate over `collection`.
10 * @returns {*} Returns the found element or its key, else `undefined`.
12 function baseFindKey(collection, predicate, eachFunc) {
14 eachFunc(collection, function(value, key, collection) {
15 if (predicate(value, key, collection)) {
23 module.exports = baseFindKey;