Socket
Socket
Sign inDemoInstall

ordered-read-streams

Package Overview
Dependencies
Maintainers
2
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


Version published
Weekly downloads
1.7M
increased by1.09%
Maintainers
2
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 09 May 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc