MCPcopy Index your code
hub / github.com/colbymchenry/codegraph / snippet

Function snippet

scripts/add-lang/dump-ast.mjs:78–81  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

76
77const freq = new Map();
78const snippet = (node) => {
79 const t = node.text.replace(/\s+/g, ' ').trim();
80 return t.length > 48 ? `${t.slice(0, 48)}…` : t;
81};
82
83function walk(node, depth, fieldName) {
84 if (node.isNamed) freq.set(node.type, (freq.get(node.type) || 0) + 1);

Callers 1

walkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected