readable-stream
is a mirror of the NodeJS stream
module which also works in the browser.
If your NodeJS version is recent it is better to directly use stream
.
The Streams API is a way to have Readable, Writable and Transform streams natively in your browser.
On NodeJS this API is available as a global since NodeJS 18.0.0, it needed to be imported from stream/web
before.
WebStreams are (experimentally) interoperable with NodeJS streams using stream.Readable.toWeb
, stream.Writable.fromWeb
, and stream.Writable.toWeb