MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / looksLikeComponent

Function looksLikeComponent

src/ui-server/api/route-roots.ts:49–53  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

47
48/** A React component, by the convention that names one: a PascalCase function in a JS-family file. */
49export function looksLikeComponent(node: Node): boolean {
50 if (node.kind === 'component') return true;
51 if (node.kind !== 'function') return false;
52 return JS_FAMILY.has(node.language) && /^[A-Z]/.test(node.name);
53}
54
55/**
56 * Route id → the layouts it renders inside, outermost first: an Angular

Callers 2

buildStepsFunction · 0.90
routeRootsFunction · 0.85

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected