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

Function angularAppCount

src/resolution/frameworks/angular-router.ts:779–787  ·  view source on GitHub ↗

* How many apps the table splits into — `byRoot.size` of * angularRouteTable, counted from the routes alone: building the table * reads every file that mounts or redirects.

(context: ResolutionContext)

Source from the content-addressed store, hash-verified

777 * reads every file that mounts or redirects.
778 */
779function angularAppCount(context: ResolutionContext): number {
780 const all = context.getNodesByKind('route');
781 const cached = appCounts.get(context);
782 if (cached && cached.source === all) return cached.count;
783 const roots = new Set<string>();
784 for (const node of all) if (inAngularTable(node)) roots.add(angularAppRoot(node.filePath, context));
785 appCounts.set(context, { source: all, count: roots.size });
786 return roots.size;
787}
788
789/**
790 * The routes a file navigates among: its app's, or — for a shared library

Callers 1

angular-router.tsFile · 0.85

Calls 6

inAngularTableFunction · 0.85
angularAppRootFunction · 0.85
getNodesByKindMethod · 0.65
getMethod · 0.65
addMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected