🧩 Checks if any item in an async iterator matches a predicate.
Syntax
TypeScript
import { someIterAsync } from '@opentf/std'; someIterAsync<T>(iter: AsyncIterable<T>, fn: (val: T) => boolean | Promise<boolean>): Promise<boolean>
Parameters
iter: The async iterable to check.fn: The predicate function.
Returns
A promise that resolves to true if any item matches, else false.
Examples
TypeScript
async function* gen() { yield 1; yield 2; } await someIterAsync(gen(), x => x > 1) //=> true