Returns a collector that returns the index of the first entry from the Iterable that satisfies the 'predicate' function.
Type of items in the source.
A function that tests each entry for a condition.
Collector that returns the index of the first entry from the Iterable that satisfies the 'predicate' function.
const result = firstIndexAsync((x) => x > 0)([1, 2, 3]);console.log(result); // 0 Copy
const result = firstIndexAsync((x) => x > 0)([1, 2, 3]);console.log(result); // 0
Returns a collector that returns the index of the first entry from the Iterable that satisfies the 'predicate' function.