You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ordered-read-streams

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ordered-read-streams

Combines array of streams into one read stream in strict order

0.0.5
Source
npm
Version published
Weekly downloads
2.7M
17.1%
Maintainers
1
Weekly downloads
 
Created

What is ordered-read-streams?

The ordered-read-streams npm package allows you to combine multiple readable streams into a single readable stream, ensuring that the data from each stream is read in the order the streams were provided. This can be particularly useful when you need to process multiple streams sequentially.

What are ordered-read-streams's main functionalities?

Combining Multiple Streams

This feature allows you to combine multiple readable streams into a single stream. The data from each stream is read in the order the streams were provided. In this example, the contents of 'file1.txt', 'file2.txt', and 'file3.txt' are read sequentially and output to the console.

const OrderedReadStreams = require('ordered-read-streams');
const fs = require('fs');

const stream1 = fs.createReadStream('file1.txt');
const stream2 = fs.createReadStream('file2.txt');
const stream3 = fs.createReadStream('file3.txt');

const combinedStream = new OrderedReadStreams([stream1, stream2, stream3]);

combinedStream.on('data', (chunk) => {
  console.log(chunk.toString());
});

combinedStream.on('end', () => {
  console.log('All streams have been read in order.');
});

Other packages similar to ordered-read-streams

FAQs

Package last updated on 18 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts