@extra-array/scan-until
Version:
Scans from left, until a test passes.
12 lines (11 loc) • 357 B
TypeScript
declare module "@extra-array/scan-until" {
import type { testFn } from "./_types";
/**
* Scans from left, until a test passes.
* @param x an array
* @param ft test function (v, i, x)
* @returns index where test passes
*/
declare function scanUntil<T>(x: Iterable<T>, ft: testFn<T>): number;
export = scanUntil;
//# sourceMappingURL=scanUntil.d.ts.map}