Skip to main content

Convert a ReadableStream to a Blob

还没翻译译自英文(bun.com)本页 4 段都还没译

Bun provides several conveniences for reading the contents of a ReadableStream into other formats. To read a stream into a Blob, call its blob() method.

const stream = new ReadableStream();
const blob = await stream.blob();

Bun.readableStreamToBlob(stream) does the same thing, but is deprecated in favor of stream.blob().


See Bun's other ReadableStream conversion functions.

译文 © 2026 fanyi.dev · 原文 © 2026 the Bun project (LICENSE.md names no copyright holder) (MIT)