Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 572 Bytes

File metadata and controls

21 lines (14 loc) · 572 Bytes
layout default
title Streams in depth
url streams
author john
date 2019-11-15

Streams

Node's stream module is an API for working with streaming data. Streams enable working with data as it is received rather than waiting for the data to be fully loaded into memory.

An example of streaming data is watching an online video broadcast. As the data is received the video can be displayed.

Streams are instances of EventEmitter.

Working with streams

To use the stream module it must be imported -

const stream = require('stream');