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
- @returnsFulfills with a Blobcontaining the full contents of the stream.
- ): Promise<NonSharedBuffer>;@returnsFulfills with a Buffercontaining the full contents of the stream.
- ): Promise<unknown>;@returnsFulfills with the contents of the stream parsed as a UTF-8 encoded string that is then passed through JSON.parse().
- ): Promise<string>;@returnsFulfills with the contents of the stream parsed as a UTF-8 encoded string.