Warning: main(): unterminated entity reference _ol\]\:list-outside ol{list-style-position:outside}.\[\&_ol\]\:list-decimal ol{list-style-type:decimal}.\[\&_ol\]\:pl-4 ol{padding-left:1rem}.\[\&_ul\]\:list-outside ul{list-style-position:outside}.\[\&_ul\]\:list-disc ul{list-style-type:disc}.\[\&_ul\]\:pl-4 ul{padding-left:1rem} in /home/feelan/public_html/ir.apponweb.api/tools/agfdsjafkdsgfkyugebhekjhevbyujec.php on line 264
Convert a Node.js Readable to a Blob | Bun Examples
Bun

GuidesStreams

Convert a Node.js Readable to a Blob with Bun

To convert a Node.js Readable stream to a Blob in Bun, you can create a new Response object with the stream as the body, then use response.blob() to read the stream into a Blob.

import { Readable } from "stream";
const stream = Readable.from(["Hello, ", "world!"]);
const blob = await new Response(stream).blob();