Closed ehmicky closed 1 year ago
How about exposing it as a .bufferStream()
method here?
pump
is going away with #21.
Note: it would be nice to get the maxBuffer feature moved to getBufferStream() as well.
👍
I have decided not to do this as the buffer stream is no longer used here. I think it's better to make it a separate package.
The
getBufferStream()
method is very useful on its own, so should probably be exposed, or put in its own library (withoutpump
).I have the following use case: a readable stream (HTTP download) that must be piped to a writable stream (writing to a local file). However I also want to retrieve the full content of that stream, so a
PassThrough
needs to be in the middle. This is basically whatgetBufferStream()
is doing in this package.Note: it would be nice to get the
maxBuffer
feature moved togetBufferStream()
as well.