Would be nice to set a max buffer (or max array) size for collect
This is similar to take
from streaming-iterables
. In the stream case we can't guarantee that we don't get more data than asked for. readasync
might do what you're looking for.
This would work for object streams