Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/reader.ts>toReadableStream

A JavaScript extension package for building strong and modern applications.
Latest
function toReadableStream
import { toReadableStream } from "https://deno.land/x/ayonli_jsext@v0.9.72/reader.ts";

Wraps a source as a ReadableStream object that can be used to process streaming data. This function is similar to toAsyncIterable, except it returns a ReadableStream object.

Parameters

iterable: AsyncIterable<T> | Iterable<T>

Parameters

optional
options: { event?: string; }

Parameters

target: EventTarget
optional
eventMap: { message?: string; error?: string; close?: string; }

Parameters

target: NodeJS.EventEmitter
optional
eventMap: { data?: string; error?: string; close?: string; }