MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / concatBuffers

Function concatBuffers

packages/core/src/utils/envelope.ts:129–140  ·  view source on GitHub ↗
(buffers: Uint8Array[])

Source from the content-addressed store, hash-verified

127}
128
129function concatBuffers(buffers: Uint8Array[]): Uint8Array {
130 const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);
131
132 const merged = new Uint8Array(totalLength);
133 let offset = 0;
134 for (const buffer of buffers) {
135 merged.set(buffer, offset);
136 offset += buffer.length;
137 }
138
139 return merged;
140}
141
142/**
143 * Parses an envelope

Callers 1

serializeEnvelopeFunction · 0.85

Calls 1

setMethod · 0.65

Tested by

no test coverage detected