极客时间返利平台,你可以在上边通过山月的链接购买课程,并添加我的微信 (shanyue94) 领取返现。

# 在 Node 中如何读取可读流的内容

Issue

欢迎在 Gtihub Issue 中回答此问题: Issue 693 (opens new window)

Author

回答者: Asarua (opens new window)

fs.createReadStream 吗,有人知道了踢我一下

let data = "";
stream.on("data", (chunk) => (data += chunk));
stream.on("end", () => console.log(data));
Last Updated: 11/27/2021, 6:11:48 PM