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

Function parseRouteObjects

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

Source from the content-addressed store, hash-verified

781}
782
783function parseRouteObjects(s: string): RouteItem[] {
784 const items: RouteItem[] = [];
785 for (const obj of splitTopLevelObjects(s)) {
786 const path = parseStringField(obj, 'path');
787 const moduleName = parseIdentField(obj, 'module');
788 const childrenStr = parseArrayField(obj, 'children');
789 const children = childrenStr ? parseRouteObjects(childrenStr) : [];
790 items.push({ path, moduleName, children });
791 }
792 return items;
793}
794
795function walkRoutesTree(
796 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