MCPcopy Create free account
hub / github.com/nodejs/undici / joinBufferArray

Function joinBufferArray

test/cache-interceptor/cache-store-test-utils.js:442–452  ·  view source on GitHub ↗

* @param {Buffer[]} buffers * @returns {Buffer}

(buffers)

Source from the content-addressed store, hash-verified

440 * @returns {Buffer}
441 */
442function joinBufferArray (buffers) {
443 const data = []
444
445 for (const buffer of buffers) {
446 buffer.forEach((chunk) => {
447 data.push(chunk)
448 })
449 }
450
451 return Buffer.from(data)
452}
453
454/**
455 * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} actual

Callers 1

compareGetResultsFunction · 0.85

Calls 2

forEachMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected