next
Round
Technologies
Coding Problems
Bookmarks
Learning Paths
Login
next
Round
Technologies
Coding Problems
Bookmarks
Learning Paths
Login
Questions
22 of 24
1
What are streams?
2
List elementary stream types.
3
What are advantages of streams.
4
Create a readable stream
5
How can you create a custom Transform stream in Node.js?
6
What is the `end` event in a readable stream, and how is it different from the `finish` event in a writable stream?
7
How can you handle errors in Node.js streams?
8
Explain the concept of object streams and provide an example use case.
9
Explain the difference between `ObjectMode` and `Buffer` mode in a readable stream.
10
Explain the difference between a flowing and a non-flowing readable stream.
11
What is the difference between the `data` event and the `readable` event in a readable stream?
12
How can you handle cleanup operations when working with streams?
13
What is the purpose of the `highWaterMark` option when creating a readable stream?
14
What is backpressure in Node.js streams, and how can you handle it?
15
What is the pause() method used for in a readable stream, and how can you resume data flow?
16
What is the purpose of the `stream.finished()` utility in Node.js?
17
How do you handle stream errors when working with async/await in Node.js?
18
How can you handle memory usage when dealing with large files in Node.js streams?
19
Explain the concept of piping in Node.js streams.
20
What is the purpose of pipeThrough function
21
What is the purpose of the `unpipe()` method in Node.js streams, and how does it work?
22
Explain the difference between `pipe()` and `on('data')` when working with streams.
23
What is the purpose of the `stream.pipeline()` function in Node.js?
24
write code of a stream to read a local file in node js
nodejs
Basics
Event Loop
Buffers
Streams
Events
Time functions
Clusters
Crypto
Modules
Worker Threads
File Operations
Threads
Performance Optimisation
Websockets
Questions
All Topics
A-
Reset
A+
22 / 24
Explain the difference between `pipe()` and `on('data')` when working with streams.
pipe(): Used to connect streams and automatically handle data flow from one stream to another.
Copy
on('data'): An event listener that allows you to manually handle incoming data as it's emitted by a readable stream.
Copy
Suggest Improvement