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

Function hop

__tests__/ui-flow-model.test.ts:58–86  ·  view source on GitHub ↗
(name: string, opts: { lines?: number; edge?: WireFlowEdge | null } = {})

Source from the content-addressed store, hash-verified

56}
57
58function hop(name: string, opts: { lines?: number; edge?: WireFlowEdge | null } = {}): WireFlowHop {
59 const lines = opts.lines ?? 7;
60 return {
61 node: {
62 id: `method:${name}`,
63 kind: 'method',
64 name,
65 qualifiedName: name,
66 file: `src/${name}.ts`,
67 line: 10,
68 endLine: 40,
69 language: 'typescript',
70 test: false,
71 },
72 edge: opts.edge === undefined ? edge() : opts.edge,
73 callRef: null,
74 source:
75 lines === 0
76 ? null
77 : {
78 file: `src/${name}.ts`,
79 language: 'typescript',
80 from: 7,
81 to: 6 + lines,
82 lines: Array.from({ length: lines }, (_, i) => `line ${i}`),
83 drift: false,
84 },
85 };
86}
87
88function flow(
89 id: string,

Callers 2

flowFunction · 0.70

Calls 2

fromMethod · 0.80
edgeFunction · 0.70

Tested by

no test coverage detected