From e88dec3423ffaed3e4873e019545f622282b7a3b Mon Sep 17 00:00:00 2001 From: Matthew Aitken Date: Sat, 20 Jun 2026 19:33:18 -0400 Subject: [PATCH] buffer: implement blob.textStream() Signed-off-by: Matthew Aitken --- doc/api/buffer.md | 14 ++++++++++++++ lib/internal/blob.js | 20 ++++++++++++++++++++ test/parallel/test-blob.js | 21 ++++++++++++++++++++- 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index a9f9a148fdcc11..4ffd229cefa34f 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -593,6 +593,18 @@ added: Returns a promise that fulfills with the contents of the `Blob` decoded as a UTF-8 string. +### `blob.textStream()` + + + +* Returns: {ReadableStream} + +Returns a new `ReadableStream` that allows the content of the `Blob` to be read +as a stream of UTF-8 decoded strings. It is equivalent to piping +[`blob.stream()`][] through a [`TextDecoderStream`][] set up with UTF-8. + ### `blob.type`