MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / byText

Function byText

graph-ui/src/galaxy/graph-scope.ts:459–459  ·  view source on GitHub ↗
(a: GraphNode, b: GraphNode)

Source from the content-addressed store, hash-verified

457 const named = (key: number) => names === 'all' || namedKeys.has(key);
458 const row = new Map<number, number>();
459 const byText = (a: GraphNode, b: GraphNode) => (a.file_path ?? '').localeCompare(b.file_path ?? '') || a.name.localeCompare(b.name) || a.id - b.id;
460 const byParent = (a: GraphNode, b: GraphNode) => {
461 const pa = parent.get(a.id), pb = parent.get(b.id);
462 return (row.get(pa?.id ?? -1) ?? -1) - (row.get(pb?.id ?? -1) ?? -1) || typeRank(pa?.edge) - typeRank(pb?.edge)

Callers 1

byParentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected