MCPcopy
hub / github.com/vuejs/core / getComponentName

Function getComponentName

packages/runtime-core/src/component.ts:1217–1224  ·  view source on GitHub ↗
(
  Component: ConcreteComponent,
  includeInferred = true,
)

Source from the content-addressed store, hash-verified

1215 str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '')
1216
1217export function getComponentName(
1218 Component: ConcreteComponent,
1219 includeInferred = true,
1220): string | false | undefined {
1221 return isFunction(Component)
1222 ? Component.displayName || Component.name
1223 : Component.name || (includeInferred && Component.__name)
1224}
1225
1226export function formatComponentName(
1227 instance: ComponentInternalInstance | null,

Callers 8

performHydrateFunction · 0.90
renderComponentRootFunction · 0.90
checkRecursiveUpdatesFunction · 0.90
pruneCacheFunction · 0.90
setupFunction · 0.90
compatConfig.tsFile · 0.90
resolveAssetFunction · 0.90
formatComponentNameFunction · 0.85

Calls 1

isFunctionFunction · 0.90

Tested by

no test coverage detected