UNPKG

808 BMarkdownView Raw
1# pull-cat
2
3concatinate pull-streams
4
5construct a new source stream from a sequential list of source streams,
6reading from each one in turn until it ends, then the next, etc.
7If one stream errors, then the rest of the streams are aborted immediately.
8If the cat stream is aborted (i.e. if it's sink errors) then all the streams
9are aborted.
10
11A cat stream is a moderately challenging stream to implement,
12especially in the context of error states.
13
14# example
15
16``` js
17var cat = require('pull-cat')
18var pull = require('pull-stream')
19pull(
20 cat([pull.values([1,2,3]), pull.values([4,5,6])]),
21 sink...
22)
23```
24
25Reads from the each stream until it is finished.
26If a stream errors, stop all the streams.
27if the concatenated stream is aborted, abort all the streams,
28then callback to the aborter.
29
30## License
31
32MIT
33
34