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

Function arrayBufferSync

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

* Collect bytes as ArrayBuffer from a sync source. * @param {Iterable } source * @param {{ limit?: number }} [options] * @returns {ArrayBuffer}

(source, options = kNullPrototype)

Source from the content-addressed store, hash-verified

254 * @returns {ArrayBuffer}
255 */
256function arrayBufferSync(source, options = kNullPrototype) {
257 validateSyncConsumerOptions(options);
258 return toArrayBuffer(concatBytes(collectSync(source, options.limit)));
259}
260
261/**
262 * Collect all chunks as an array from a sync source.

Callers 3

testArrayBufferSyncBasicFunction · 0.85
testArrayBufferSyncSABFunction · 0.85

Calls 4

concatBytesFunction · 0.85
collectSyncFunction · 0.85
toArrayBufferFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…