Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
function readerFromStreamReader
import { readerFromStreamReader } from "";

Create a Reader from a ReadableStreamDefaultReader.


Example 1

import { copy } from "";
import { readerFromStreamReader } from "";

const res = await fetch("");
const file = await"./", { create: true, write: true });

const reader = readerFromStreamReader(res.body!.getReader());
await copy(reader, file);


streamReader: ReadableStreamDefaultReader<Uint8Array>