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

Function addItemToEnvelope

packages/core/src/utils/envelope.ts:37–40  ·  view source on GitHub ↗
(envelope: E, newItem: E[1][number])

Source from the content-addressed store, hash-verified

35 * so that the envelope types resolve correctly.
36 */
37export function addItemToEnvelope<E extends Envelope>(envelope: E, newItem: E[1][number]): E {
38 const [headers, items] = envelope;
39 return [headers, [...items, newItem]] as unknown as E;
40}
41
42/**
43 * Convenience function to loop through the items and item types of an envelope.

Callers 4

utils.test.tsFile · 0.90
envelope.test.tsFile · 0.90
sendEventFunction · 0.90
http.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected