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

Function getFunctionName

packages/core/src/utils/stacktrace.ts:133–144  ·  view source on GitHub ↗
(fn: unknown)

Source from the content-addressed store, hash-verified

131 * Safely extract function name from itself
132 */
133export function getFunctionName(fn: unknown): string {
134 try {
135 if (!fn || typeof fn !== 'function') {
136 return defaultFunctionName;
137 }
138 return fn.name || defaultFunctionName;
139 } catch {
140 // Just accessing custom props in some Selenium environments
141 // can cause a "Permission denied" exception (see raven-js#495).
142 return defaultFunctionName;
143 }
144}
145
146/**
147 * Get's stack frames from an event without needing to check for undefined properties.

Callers 7

stringifyValueFunction · 0.90
triggerHandlersFunction · 0.90
triggerHandlersFunction · 0.90
_wrapTimeFunctionFunction · 0.85
_wrapRAFFunction · 0.85
_wrapXHRFunction · 0.85
_wrapEventTargetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected