pull-stream-concat

0.0.2 • Public • Published

pull-stream-concat

WARNING: After writing this, I found pull-cat which does the same thing (but handles the case where the first stream errors properly). I'll be using that library and I suggest you do the same. This code is left here to warn others searching npm for the same thing and for people curious to see a slighty different approach to the same code.

Concatenates multiple pull-streams, returning a new pull-stream:

var concat = require('pull-stream-concat');
 
var all = concat(
    pull.values([1,2]),
    pull.values([3,4]),
    pull.values([5])
);
 
all.pipe(pull.collect(function (err, xs) {
    // xs will be [1, 2, 3, 4, 5]
});

Readme

Keywords

none

Package Sidebar

Install

npm i pull-stream-concat

Weekly Downloads

2

Version

0.0.2

License

none

Last publish

Collaborators

  • caolan