Curated from: medium.com
Ideas, facts & insights covering these topics:
7 ideas
·320 reads
2
Explore the World's Best Ideas
Join today and uncover 100+ curated journeys from 50+ topics. Unlock access to our mobile app with extensive features.
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 powerful when working with large amounts of data, or data that’s coming from an external source one chunk at a time.
However, streams are not only about working with big data. They also give us the power of composability in our code. Just like we can compose powerful linux commands by piping other smaller Linux commands, we can do exactly the same in Node with streams.
11
75 reads
There are four fundamental stream types in Node.js: Readable, Writable, Duplex, and Transform streams.
9
56 reads
The most important events on a readable stream are:
9
39 reads
Readable streams have two main modes that affect the way we can consume them:
9
47 reads
When we talk about streams in Node.js, there are two main different tasks:
8
35 reads
This write method takes three arguments.
8
32 reads
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 its input.
For a transform stream, we don’t have to implement the read or write methods, we only need to implement a transform method, which combines both of them. It has the signature of the write method and we can use it to push data as well. Here’s an example duplex stream which
8
36 reads
IDEAS CURATED BY
Learn more about computerscience with this collection
Find out the challenges it poses
Learn about the potential impact on society
Understanding the concept of Metaverse
Related collections
Similar ideas
Read & Learn
20x Faster
without
deepstash
with
deepstash
with
deepstash
Personalized microlearning
—
100+ Learning Journeys
—
Access to 200,000+ ideas
—
Access to the mobile app
—
Unlimited idea saving
—
—
Unlimited history
—
—
Unlimited listening to ideas
—
—
Downloading & offline access
—
—
Supercharge your mind with one idea per day
Enter your email and spend 1 minute every day to learn something new.
I agree to receive email updates