import { Awaitable} from 'justypes' export async function everyAsync( iterable: Iterable | AsyncIterable , predicate: (element: Awaited, index: number) => Awaitable ): Promise { let index = 0 for await (const element of iterable) { if (!await predicate(element, index)) return false index++ } return true }