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

x/ayonli_jsext/reader.ts

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

Utility functions for reading data from various types of source into various forms.

Functions

Concatenates multiple readable streams into a single one.

Reads all data from the iterable object or readable stream to an array.

Reads all data from the given source to an ArrayBuffer.

Reads all data from the given source to a Blob.

Reads all data from the given source to a data URL.

Reads all data from the given source to a JSON object.

Reads all data from the given source to an object URL.

Reads all data from the given source to a string.

If the given promise resolves to a ReadableStream<Uint8Array>, this function will return a new ReadableStream<Uint8Array> object that can be used to read the byte stream without the need to wait for the promise to resolve.

Wraps a source as an AsyncIterable object that can be used in the for await...of... loop for reading streaming data.

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.