Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/caolan/pull-stream-concat
Concatenates pull-streams
https://github.com/caolan/pull-stream-concat
Last synced: 11 days ago
JSON representation
Concatenates pull-streams
- Host: GitHub
- URL: https://github.com/caolan/pull-stream-concat
- Owner: caolan
- Created: 2014-01-15T17:05:29.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-20T19:15:35.000Z (almost 11 years ago)
- Last Synced: 2024-10-11T07:34:50.366Z (about 1 month ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pull-stream-concat
**WARNING:** After writing this, I found
[pull-cat](https://github.com/dominictarr/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](https://github.com/dominictarr/pull-stream), returning a new
pull-stream:```javascript
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]
});
```