Skip to main content
Module

x/dtils/mod.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.5.0/mod.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>