JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 254792
  • Score
    100M100P100Q189575F

Pipe queued streams progressively.

Package Exports

  • streamqueue

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (streamqueue) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

StreamQueue NPM version Build Status

StreamQueue pipe the queued streams one by one in order to preserve their content order.

Usage

Install the npm module:

npm install StreamQueue --save

Then, in your scripts:

var StreamQueue = require('StreamQueue');

var queue = new StreamQueue();
queue.queue(
  Fs.createReadStream('input.txt'),
  Fs.createReadStream('input2.txt'),
  Fs.createReadStream('input3.txt')
);
queue.done();

queue.pipe(process.stdout);

You can also chain QueueStream methods like that:

var StreamQueue = require('StreamQueue');

new StreamQueue()
  .queue(Fs.createReadStream('input.txt'))
  .queue(Fs.createReadStream('input2.txt'))
  .queue(Fs.createReadStream('input3.txt'))
  .done()
  .pipe(process.stdout);

You can queue new streams at any moment until you call the done() method. So the created stream will not fire the end event until done() call.

Contributing

Feel free to pull your code if you agree with publishing it under the MIT license.