stream-collector
Buffer data
from a stream into an array if a callback is provided
npm install stream-collector
Usage
var collect =
The stream
is always returned from the function. If a callback isn't provided no buffering will occur.
This allows you to do the following pattern where if you provide a callback the stream will be buffered (similar to how request works)
var {var stream = dbreturn}var stream = // does not buffer
License
MIT