aboutsummaryrefslogtreecommitdiff
path: root/docs/guides/streams/to-blob.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/guides/streams/to-blob.md')
-rw-r--r--docs/guides/streams/to-blob.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/guides/streams/to-blob.md b/docs/guides/streams/to-blob.md
new file mode 100644
index 000000000..3380dca38
--- /dev/null
+++ b/docs/guides/streams/to-blob.md
@@ -0,0 +1,14 @@
+---
+name: Convert a ReadableStream to a Blob
+---
+
+Bun provides a number of convenience functions for reading the contents of a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) into different formats.
+
+```ts
+const stream = new ReadableStream();
+const blob = await Bun.readableStreamToBlob(stream);
+```
+
+---
+
+See [Docs > API > Utils](/docs/api/utils#bun-readablestreamto) for documentation on Bun's other `ReadableStream` conversion functions.