@newdash/newdash
Version:
javascript/typescript utility library
13 lines (12 loc) • 541 B
TypeScript
export default baseFindIndex;
/**
* The base implementation of `findIndex` and `findLastIndex`.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} predicate The function invoked per iteration.
* @param {number} fromIndex The index to search from.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
declare function baseFindIndex(array: any[], predicate: Function, fromIndex: number, fromRight?: boolean): number;