PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

Node.js · Theory

Streams

← All stacks

Theory

21/723

Streams

If you can teach Streams using read a big CSV, you know it. If you only know the heading, you don’t.

Streams order — meaning → createReadStream → one limit. Dumping ten features helps nobody.

Skip Streams and loading the whole file into RAM shows up in an upload job.

Use Streams when read a big CSV must stay clear. If a simpler Node.js step works, use that instead.

Streams trap — loading the whole file into RAM. Amit loses marks for that every viva.

Place Streams next to nearby Node.js work — createReadStream is the link.

Viva for Streams — what it is → createReadStream → the mistake (loading the whole file into RAM).

Exam tip

Board: read a big CSV. Dry-run Streams. Name the trap: loading the whole file into RAM.

Example

// Streams
const users = [
  { id: 1, name: "Asha" },
  { id: 2, name: "Ravi" },
];

function findUser(id) {
  return users.find((u) => u.id === id) ?? null;
}

console.log(findUser(2));
console.log(users.map((u) => u.name));

Streams: find user 2, then list names. Say both prints.

Short notes

  • DefStreams — Amit uses it for read a big CSV in an upload job.
  • RuleStreams → createReadStream.
  • RememberStreams + an Express route (an upload job).
  • UseStreams in an upload job (read a big CSV).
  • TrapStreams — loading the whole file into RAM.
  • ExStreams → read a big CSV.

Questions

1

Amit asks: why does Streams exist? Use read a big CSV.

2

When would Amit actually reach for Streams?

3

How do you catch loading the whole file into RAM?

4

Show Streams in an Express route terms — three lines max.

Previous← BuffersNextFile System →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.