📜  nodejs 创建流 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:09.803000             🧑  作者: Mango

代码示例1
const { Readable } = require("stream")

const readable = Readable.from(["input string"])

readable.on("data", (chunk) => {
  console.log(chunk) // will be called once with `"input string"`
})