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