export async function* tap(it: AsyncIterableIterator, interceptor: (value: T) => void) { for await (const chunk of it) { interceptor(chunk) yield chunk } }