byline-interleave

1.1.2 • Public • Published

byline-interleave

Interleaved line-by-line streaming from multiple streams

It currently assumes that all input streams provide equal number of lines. The order of the lines in the consuming end is not guaranteed to be the same as the order of the input files.

Install

npm install byline-interleave

Usage

var interleave = require('byline-interleave');
 
var stream = interleave(
  'file-1.txt',
  'file-2.txt'
);
 
stream.on('data', function(data) {
  console.log(data); // ['line 1 from file-1.txt', 'line 1 from file2.txt'] etc
});
 
stream.on('end', function() {
  console.log('end of stream');
});

Package Sidebar

Install

npm i byline-interleave

Weekly Downloads

2

Version

1.1.2

License

MIT

Last publish

Collaborators

  • lammas