The methods exposed by node:stream/consumers (available since 16.14.0):
Are slightly simpler than calling toArray() + join()
Are faster
Work with browser-compatible ReadableStream, not only Node.js streams
They can also output buffers. For this reason, this PR also updates what seems to be the remaining reasons to use this package: the maxBuffer and encoding options.
The methods exposed by
node:stream/consumers
(available since16.14.0
):toArray()
+join()
ReadableStream
, not only Node.js streamsThey can also output buffers. For this reason, this PR also updates what seems to be the remaining reasons to use this package: the
maxBuffer
andencoding
options.