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

Function addNonEnumerableProperty

packages/core/src/utils/object.ts:55–66  ·  view source on GitHub ↗
(obj: object, name: string | symbol, value: unknown)

Source from the content-addressed store, hash-verified

53 * @param value The value to which to set the property
54 */
55export function addNonEnumerableProperty(obj: object, name: string | symbol, value: unknown): void {
56 try {
57 Object.defineProperty(obj, name, {
58 // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it
59 value,
60 writable: true,
61 configurable: true,
62 });
63 } catch {
64 DEBUG_BUILD && debug.log(`Failed to add non-enumerable property "${String(name)}" to object`, obj);
65 }
66}
67
68/**
69 * Remembers the original function on the wrapped function and

Callers 15

createAsyncHandlerProxyFunction · 0.90
updateNavigationSpanFunction · 0.90
handleNavigationFunction · 0.90
patchSpanEndFunction · 0.90
enhanceHttpServerSpanFunction · 0.90
object.test.tsFile · 0.90
_setSpanForScopeFunction · 0.90
setSkipNormalizationHintFunction · 0.90

Calls 1

logMethod · 0.65

Tested by

no test coverage detected