1.1.11 • Published 8 years ago

pull-cat v1.1.11

Weekly downloads
35,628
License
MIT
Repository
github
Last release
8 years ago

pull-cat

Concatenate pull-streams

Install

npm install --save pull-cat

Example

Construct a new source stream from a sequential list of source streams, reading from each one in turn until it ends, then the next, etc. If one stream errors, then the rest of the streams are aborted immediately. If the cat stream is aborted (i.e. if it's sink errors) then all the streams are aborted.

A cat stream is a moderately challenging stream to implement, especially in the context of error states.

var cat = require('pull-cat')
var pull = require('pull-stream')

pull(
  cat([
    pull.values([1,2,3]),
    pull.values([4,5,6])
  ]),
  pull.log()
)
// 1
// 2
// 3
// 4
// 5
// 6

Api

cat = require('pull-cat')

stream = cat(streams)

Reads from each stream in streams until finished.

If a stream errors, stop all the streams. if the concatenated stream is aborted, abort all the streams, then callback to the aborter.

License

MIT

1.1.11

8 years ago

1.1.10

8 years ago

1.1.9

8 years ago

1.1.8

9 years ago

1.1.7

9 years ago

1.1.5

10 years ago

1.1.4

11 years ago

1.1.3

11 years ago

1.1.2

11 years ago

1.1.1

11 years ago

1.1.0

11 years ago

1.0.3

11 years ago

1.0.2

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago