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

x/ayonli_jsext/esm/reader.js>resolveByteStream

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

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.

This function is optimized for zero-copy read, so it's recommended to use this function when the source stream is a byte stream.

Parameters

promise