UNPKG

lodash-es

Version:

The modern build of lodash exported as ES modules.

19 lines (16 loc) 516 B
import baseCallback from './baseCallback'; import baseFind from './baseFind'; /** * Creates a `_.findKey` or `_.findLastKey` function. * * @private * @param {Function} objectFunc The function to iterate over an object. * @returns {Function} Returns the new find function. */ function createFindKey(objectFunc) { return function(object, predicate, thisArg) { predicate = baseCallback(predicate, thisArg, 3); return baseFind(object, predicate, objectFunc, true); }; } export default createFindKey;