unstream
Like concat-stream
, or bl
except it returns a transform stream, allowing you to continue streaming after concat-buffering.
Currently unstream doesn't support object-mode.
unstream(options, transformFn (body, callback(err, data)) { })
var unstream = ; fs ;
options
Options object. Same as TransformStream
options, plus some extras:
limit [Number]
- maximum number of bytes to buffer. The default isInfinity
. Set this to a hard limit to prevent memory leaks.
transformFn (body, callback) { }
Function that gets called when the buffering is complete.
body [Buffer]
- fully buffered data from the source stream.callback(err, data)
- Call this to continue streaming thedata
to the destination. This allows you to perform a transform on the fully buffered data, and re-stream it.
License
MIT