0.1.1 • Published 11 years ago

xtream v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
11 years ago

xtream

NPM

Build Status

stream2 helpers, inspired by rvagg/through2 and its friends

TL;DL

Ttransform stream

  • xtream.through(streamOptions, transform, flush)
  • xtream.map(streamOptions, mapCallback)
  • xtream.reduce(streamOptions, reduceCallback, initial)
  • xtream.filter(streamOptions, filterCallback)

Transform stream helpers that mimick the Array operations.

Passthrough streams

  • xtream.inspect(streamOptions, inspectCallback)

Do nothing but emit every read data to inspectCallback

Duplex streams

  • xtream.duplex(streamOptions, readableStream, writableStream)

Generate a duplex stream that write to writableStream, read from readableStream

Readable streams

  • xtream.split(streamOptions, spliter, mapCallback);

Split emitted data using spliter. Optional mapCallback can be assigned to process each splited result.

Writeable streams

  • xtream.concat(completeCallback)

Collect all readable contents into the completeCallback.

Stream control

  • xtream.combine(fisrtStream, secondStream, thirdStream, ..., lastStream);

Generate a stream pipeline; Write to the first stream, read from last stream and each stream is piped to the next in line.

References

0.1.1

11 years ago

0.1.0

11 years ago

0.0.1

11 years ago