Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/oak/utils/streams.ts>readableStreamFromReader

A middleware framework for handling HTTP with Deno, Node, Bun and Cloudflare Workers 🐿️ 🦕
Extremely Popular
Latest
function readableStreamFromReader
import { readableStreamFromReader } from "https://deno.land/x/oak@v16.1.0/utils/streams.ts";

Create a ReadableStream<Uint8Array> from a Reader.

When the pull algorithm is called on the stream, a chunk from the reader will be read. When null is returned from the reader, the stream will be closed along with the reader (if it is also a Closer).

Parameters

reader: Reader | (Reader & Closer)
optional
options: ReadableStreamFromReaderOptions = [UNSUPPORTED]