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

Function blob

lib/stream/consumers.js:30–35  ·  view source on GitHub ↗

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

(stream)

Source from the content-addressed store, hash-verified

28 * @returns {Promise<Blob>}
29 */
30async function blob(stream) {
31 const chunks = [];
32 for await (const chunk of stream)
33 chunks.push(chunk);
34 return new Blob(chunks);
35}
36
37/**
38 * @param {AsyncIterable|ReadableStream|Readable} stream

Callers 1

arrayBufferFunction · 0.70

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected