MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / extractComponentName

Function extractComponentName

packages/vue/src/tracing.ts:50–52  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

48/** Find if the current component exists in the provided `TracingOptions.trackComponents` array option. */
49export function findTrackComponent(trackComponents: string[], formattedName: string): boolean {
50 function extractComponentName(name: string): string {
51 return name.replace(/^<([^\s]*)>(?: at [^\s]*)?$/, '$1');
52 }
53
54 const isMatched = trackComponents.some(compo => {
55 return extractComponentName(formattedName) === extractComponentName(compo);

Callers 1

findTrackComponentFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected