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

Function readBinary

packages/core/src/utils/envelope.ts:148–153  ·  view source on GitHub ↗
(length: number)

Source from the content-addressed store, hash-verified

146 let buffer = typeof env === 'string' ? encodeUTF8(env) : env;
147
148 function readBinary(length: number): Uint8Array {
149 const bin = buffer.subarray(0, length);
150 // Replace the buffer with the remaining data excluding trailing newline
151 buffer = buffer.subarray(length + 1);
152 return bin;
153 }
154
155 function readJson<T>(): T {
156 let i = buffer.indexOf(0xa);

Callers 2

readJsonFunction · 0.85
parseEnvelopeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected