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

Function buffer

lib/stream/consumers.js:50–52  ·  view source on GitHub ↗

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

(stream)

Source from the content-addressed store, hash-verified

48 * @returns {Promise<Buffer>}
49 */
50async function buffer(stream) {
51 return Buffer.from(await arrayBuffer(stream));
52}
53
54/**
55 * @param {AsyncIterable|ReadableStream|Readable} stream

Callers

nothing calls this directly

Calls 2

arrayBufferFunction · 0.70
fromMethod · 0.45

Tested by

no test coverage detected