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

Function navs

__tests__/angular-router.test.ts:595–599  ·  view source on GitHub ↗
(cg: CodeGraph)

Source from the content-addressed store, hash-verified

593 }
594 const routeNames = (cg: CodeGraph) => cg.getNodesByKind('route').map((n) => n.name).sort();
595 const navs = (cg: CodeGraph) =>
596 cg
597 .getNodesByKind('route')
598 .flatMap((r) => cg.getIncomingEdges(r.id).filter((e) => e.kind === 'navigates').map((e) => `${cg.getNode(e.source)!.name} -> ${r.name}`))
599 .sort();
600 const component = (name: string, selector: string, template: string) => `import { Component } from '@angular/core';
601@Component({ selector: '${selector}', template: \`${template}\` })
602export class ${name} {}

Callers 1

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesByKindMethod · 0.65
getIncomingEdgesMethod · 0.65

Tested by

no test coverage detected