Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
core-util-is | 1.0.3 | 1.85 kB | MIT | prod | |
inherits | 2.0.4 | 1.98 kB | ISC | prod | |
isarray | 1.0.0 | 1.97 kB | MIT | prod | |
process-nextick-args | 2.0.1 | 1.62 kB | MIT | prod | |
readable-stream | 2.3.8 | 25.14 kB | MIT | prod | |
safe-buffer | 5.1.2 | 9.59 kB | MIT | prod | |
string_decoder | 1.1.1 | 4.72 kB | MIT | prod | |
util-deprecate | 1.0.2 | 2.19 kB | MIT | prod |
Readable-stream is a Node.js package providing a mirror of the streams implementations in Node.js 18.16.0. It offers Node.js core streams for userland. This package is designed to provide a stable streams base regardless of the Node.js version you or the users of your libraries are using. Using readable-stream, you can avoid using the "stream" module in Node-core. It guarantees better stability and is recommended for use instead of "stream".
The use of readable-stream in application development is straightforward. First, you have to install the package using npm as follows:
npm install readable-stream
Then you can replace your require('stream')
with require('readable-stream')
without any changes if you're only using one of the main classes and functions. Below is an example of how to use some of the main classes and functions:
const {
Readable,
Writable,
Transform,
Duplex,
pipeline,
finished
} = require('readable-stream')
If you're using readable-stream in browsers, you will need a bundler like browserify
, webpack
, parcel
, or similar. It's also important to note that polyfills are no longer required since version 4.2.0.
The full documentation of readable-stream can be found on the Node.js website. Here is the link to the documentation: https://nodejs.org/dist/v18.16.0/docs/api/stream.html. The documentation provides comprehensive information about the use and functionalities of readable-stream. It's recommended to review the documentation to fully understand how to implement readable-stream in your project.