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

Function estimatePrimitiveSizeInBytes

packages/core/src/client.ts:1818–1828  ·  view source on GitHub ↗
(value: Primitive)

Source from the content-addressed store, hash-verified

1816}
1817
1818function estimatePrimitiveSizeInBytes(value: Primitive): number {
1819 if (typeof value === 'string') {
1820 return value.length * 2;
1821 } else if (typeof value === 'number') {
1822 return 8;
1823 } else if (typeof value === 'boolean') {
1824 return 4;
1825 }
1826
1827 return 0;
1828}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected