MCPcopy Index your code
hub / github.com/nodejs/node / arrayBuffer

Function arrayBuffer

lib/internal/streams/iter/consumers.js:311–315  ·  view source on GitHub ↗

* Collect bytes as ArrayBuffer from an async or sync source. * @param {AsyncIterable |Iterable } source * @param {{ signal?: AbortSignal, limit?: number }} [options] * @returns {Promise }

(source, options = kNullPrototype)

Source from the content-addressed store, hash-verified

309 * @returns {Promise<ArrayBuffer>}
310 */
311async function arrayBuffer(source, options = kNullPrototype) {
312 validateConsumerOptions(options);
313 const chunks = await collectAsync(source, options.signal, options.limit);
314 return toArrayBuffer(concatBytes(chunks));
315}
316
317/**
318 * Collect all chunks as an array from an async or sync source.

Callers

nothing calls this directly

Calls 4

validateConsumerOptionsFunction · 0.85
collectAsyncFunction · 0.85
concatBytesFunction · 0.85
toArrayBufferFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…