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

Function shape

__tests__/ui-highlight.test.ts:48–50  ·  view source on GitHub ↗

What the code block would render for one line: `class:text` per token.

(result: HighlightResult, line: number)

Source from the content-addressed store, hash-verified

46
47/** What the code block would render for one line: `class:text` per token. */
48function shape(result: HighlightResult, line: number): string[] {
49 return tokensOf(result, line).map((t) => `${t.cls}:${t.text}`);
50}
51
52function lineRef(over: Partial<LineRef>): LineRef {
53 return {

Callers 1

Calls 2

tokensOfFunction · 0.85
mapMethod · 0.80

Tested by

no test coverage detected