Skip to main content
Module

x/dtils/mod.unstable.ts>readStreamToFn

The best unofficial library of utilities for Deno applications
Go to Latest
function readStreamToFn
Re-export
import { readStreamToFn } from "https://deno.land/x/dtils@2.6.0/mod.unstable.ts";

Read 1streamintofn, calling fnfor every chunk. Iffn` returns a promise, it will be awaited

Parameters

stream: ReadableStream<T>
fn: (data: T) => unknown

Returns

Promise<void>