MCPcopy Create free account
hub / github.com/PatrickSys/codebase-context / containsJsx

Function containsJsx

src/analyzers/react/index.ts:485–497  ·  view source on GitHub ↗
(node: TSESTree.Node | TSESTree.Node[] | null)

Source from the content-addressed store, hash-verified

483}
484
485function containsJsx(node: TSESTree.Node | TSESTree.Node[] | null): boolean {
486 if (!node) {
487 return false;
488 }
489
490 let found = false;
491 walkAst(node, (candidate) => {
492 if (candidate.type === 'JSXElement' || candidate.type === 'JSXFragment') {
493 found = true;
494 }
495 });
496 return found;
497}
498
499function getCalleeName(node: TSESTree.Expression | TSESTree.Super): string | null {
500 if (node.type === 'Identifier') {

Callers 1

summarizeReactProgramFunction · 0.85

Calls 1

walkAstFunction · 0.85

Tested by

no test coverage detected