> ## Documentation Index
> Fetch the complete documentation index at: https://bun.ll1025.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 将 Node.js Readable 转换为字符串

要在 Bun 中将 Node.js `Readable` 流转换为字符串，请创建一个以该流为正文的 [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)，然后调用 [`response.text()`](https://developer.mozilla.org/en-US/docs/Web/API/Response/text)。

```ts theme={null}
import { Readable } from "stream";
const stream = Readable.from([Buffer.from("Hello, world!")]);
const text = await new Response(stream).text();
console.log(text); // "Hello, world!"
```
