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

Function append

packages/core/src/utils/envelope.ts:97–103  ·  view source on GitHub ↗
(next: string | Uint8Array)

Source from the content-addressed store, hash-verified

95 let parts: string | Uint8Array[] = JSON.stringify(envHeaders);
96
97 function append(next: string | Uint8Array): void {
98 if (typeof parts === 'string') {
99 parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts), next];
100 } else {
101 parts.push(typeof next === 'string' ? encodeUTF8(next) : next);
102 }
103 }
104
105 for (const item of items) {
106 const [itemHeaders, payload] = item;

Callers 1

serializeEnvelopeFunction · 0.85

Calls 2

encodeUTF8Function · 0.85
pushMethod · 0.80

Tested by

no test coverage detected