Which of the following objects is a stream Code Answer

Streams are often used to access data from the internet. They can be concatenated into one long stream, and they can also be filtered or transformed in many different ways. There are many different types of streams in javascript but I will focus on one type: readable streams.

nodejs create stream

on Jan 01, 1970
const { Readable } = require("stream")

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

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

Add Comment

1

These streams read data as it becomes available, but unlike events, they do not emit events when they receive new data or complete it.

Javascript answers related to "Which of the following objects is a stream"

View All Javascript queries

Javascript queries related to "Which of the following objects is a stream"

Browse Other Code Languages

CodeProZone