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

Function parseRouteObjects

src/resolution/frameworks/nestjs.ts:786–796  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

784}
785
786function parseRouteObjects(s: string): RouteItem[] {
787 const items: RouteItem[] = [];
788 for (const obj of splitTopLevelObjects(s)) {
789 const path = parseStringField(obj, 'path');
790 const moduleName = parseIdentField(obj, 'module');
791 const childrenStr = parseArrayField(obj, 'children');
792 const children = childrenStr ? parseRouteObjects(childrenStr) : [];
793 items.push({ path, moduleName, children });
794 }
795 return items;
796}
797
798function walkRoutesTree(
799 items: RouteItem[],

Callers 1

parseRoutesArrayFunction · 0.85

Calls 5

splitTopLevelObjectsFunction · 0.85
parseStringFieldFunction · 0.85
parseIdentFieldFunction · 0.85
parseArrayFieldFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected