mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Bump to v3.6.0.
This commit is contained in:
18
internal/createFindKey.js
Normal file
18
internal/createFindKey.js
Normal file
@@ -0,0 +1,18 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user