MCPcopy
hub / github.com/npmx-dev/npmx.dev / buildSymbolLookup

Function buildSymbolLookup

server/utils/docs/processing.ts:47–57  ·  view source on GitHub ↗
(nodes: DenoDocNode[])

Source from the content-addressed store, hash-verified

45 * Used for {@link} cross-references.
46 */
47export function buildSymbolLookup(nodes: DenoDocNode[]): SymbolLookup {
48 const lookup = new Map<string, string>()
49
50 for (const node of nodes) {
51 const cleanName = cleanSymbolName(node.name)
52 const id = createSymbolId(node.kind, cleanName)
53 lookup.set(cleanName, id)
54 }
55
56 return lookup
57}
58
59/**
60 * Merge function/method overloads into single entries.

Callers 1

generateDocsWithDenoFunction · 0.90

Calls 3

cleanSymbolNameFunction · 0.90
createSymbolIdFunction · 0.90
setMethod · 0.65

Tested by

no test coverage detected