1 var baseCallback = require('./baseCallback'),
2 baseFindIndex = require('./baseFindIndex');
5 * Creates a `_.findIndex` or `_.findLastIndex` function.
8 * @param {boolean} [fromRight] Specify iterating from right to left.
9 * @returns {Function} Returns the new find function.
11 function createFindIndex(fromRight) {
12 return function(array, predicate, thisArg) {
13 if (!(array && array.length)) {
16 predicate = baseCallback(predicate, thisArg, 3);
17 return baseFindIndex(array, predicate, fromRight);
21 module.exports = createFindIndex;