Answers for "what is stream in node"

7

nodejs create stream

const { Readable } = require("stream")

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

readable.on("data", (chunk) => {
  console.log(chunk) // will be called once with `"input string"`
})
Posted by: Guest on July-21-2020

Browse Popular Code Answers by Language