* Creates a `_.findIndex` or `_.findLastIndex` function. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new find function.
(fromRight)
| 4808 | * @returns {Function} Returns the new find function. |
| 4809 | */ |
| 4810 | function createFindIndex(fromRight) { |
| 4811 | return function(array, predicate, thisArg) { |
| 4812 | if (!(array && array.length)) { |
| 4813 | return -1; |
| 4814 | } |
| 4815 | predicate = getCallback(predicate, thisArg, 3); |
| 4816 | return baseFindIndex(array, predicate, fromRight); |
| 4817 | }; |
| 4818 | } |
| 4819 | |
| 4820 | /** |
| 4821 | * Creates a `_.findKey` or `_.findLastKey` function. |
no test coverage detected