Fulfills with an ArrayBuffer
containing the full contents of the stream.
Node.js module
stream/consumers
The 'node:stream/consumers'
submodule offers helper functions that consume Readable streams into other forms, such as blob
, arrayBuffer
, text
, or json
.
It simplifies common stream-to-data conversions without manual event handling.
- @returns
- @returns
Fulfills with a
Blob
containing the full contents of the stream. - @returns
Fulfills with a
Buffer
containing the full contents of the stream. - ): Promise<unknown>;@returns
Fulfills with the contents of the stream parsed as a UTF-8 encoded string that is then passed through
JSON.parse()
. - ): Promise<string>;@returns
Fulfills with the contents of the stream parsed as a UTF-8 encoded string.