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

Function dedupeComponents

src/analyzers/react/index.ts:551–561  ·  view source on GitHub ↗
(components: CodeComponent[])

Source from the content-addressed store, hash-verified

549}
550
551function dedupeComponents(components: CodeComponent[]): CodeComponent[] {
552 const seen = new Set<string>();
553 return components.filter((component) => {
554 const key = `${component.name}:${component.startLine}:${component.endLine}:${component.componentType}`;
555 if (seen.has(key)) {
556 return false;
557 }
558 seen.add(key);
559 return true;
560 });
561}
562
563function walkAst(
564 root: TSESTree.Node | TSESTree.Node[],

Callers 1

summarizeReactProgramFunction · 0.85

Calls 2

hasMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected