MCPcopy Create free account
hub / github.com/nodejs/node / bytes

Function bytes

lib/stream/consumers.js:58–60  ·  view source on GitHub ↗

* @param {AsyncIterable|ReadableStream|Readable} stream * @returns {Promise }

(stream)

Source from the content-addressed store, hash-verified

56 * @returns {Promise<Uint8Array>}
57 */
58async function bytes(stream) {
59 return new Uint8Array(await arrayBuffer(stream));
60}
61
62/**
63 * @param {AsyncIterable|ReadableStream|Readable} stream

Callers

nothing calls this directly

Calls 1

arrayBufferFunction · 0.70

Tested by

no test coverage detected