@extra-array/search
Version:
Finds index of first value passing a test.
12 lines (11 loc) • 349 B
TypeScript
declare module "@extra-array/search" {
import type { testFn } from "./_types";
/**
* Finds index of first value passing a test.
* @param x an array
* @param ft test function (v, i, x)
* @returns index of value, -1 if not found
*/
declare function search<T>(x: T[], ft: testFn<T>): number;
export = search;
//# sourceMappingURL=search.d.ts.map}