Node.js Streams: Everything you need to know - Deepstash

Streams are collections of data — just like arrays or strings. The difference is that streams might not be available all at once, and they don’t have to fit in memory. This makes streams really pow...

STASHED IN:

8

Node.js Streams: Everything you need to know

medium.com

STASHED IN:

0 Comments

There are four fundamental stream types in Node.js: Readable, Writable, Duplex, and Transform streams.

  • A readable stream is an abstraction for a source from which data can be consumed. ...

STASHED IN:

7

The most important events on a readable stream are:

  • The data event, which is emitted whenever the stream passes a chunk of data to the consumer
  • The end event, which is emitted ...

STASHED IN:

7

Readable streams have two main modes that affect the way we can consume them: 

  • They can be either in the paused mode 
  • Or in the flowing mode.

STASHED IN:

7

When we talk about streams in Node.js, there are two main different tasks:

  • The task of implementing the streams.
  • The task of consuming them.

STASHED IN:

6

This write method takes three arguments.

  • The chunk is usually a buffer unless we configure the stream differently.
  • The encoding argument is needed in that case, but usually we ...

STASHED IN:

6

The readable and Writable sides of a duplex stream operate completely independently from one another. A transform stream is the more interesting duplex stream because its output is computed from it...

STASHED IN:

6

Deepstash helps you become inspired, wiser and productive, through bite-sized ideas from the best articles, books and videos out there.

GET THE APP: