pull-drain
Pull stream sink that drains source stream's data
A pull stream sink that calls function for each data in the stream.
{ // Finished}
Note: This is a continuable.
Installation
$ npm install --save pull-drain
Usage
drain(op)
Drain stream data, calling op
for each read.
{ // Finished} // No callback:
Return false
inside the op
function to abort the stream.
drain(op).abort([err])
To abort the stream from outside the callback, you can use an .abort
method, and optionally pass it an error:
var drainer = if foo drainer { // You got an error!}
License
MIT © Jamen Marz