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

Function serializeNode

src/context/formatter.ts:245–262  ·  view source on GitHub ↗

* Serialize a node for JSON output

(node: Node)

Source from the content-addressed store, hash-verified

243 * Serialize a node for JSON output
244 */
245function serializeNode(node: Node): Record<string, unknown> {
246 return {
247 id: node.id,
248 kind: node.kind,
249 name: node.name,
250 qualifiedName: node.qualifiedName,
251 filePath: node.filePath,
252 language: node.language,
253 startLine: node.startLine,
254 endLine: node.endLine,
255 signature: node.signature,
256 docstring: node.docstring,
257 visibility: node.visibility,
258 isExported: node.isExported,
259 isAsync: node.isAsync,
260 isStatic: node.isStatic,
261 };
262}
263
264/**
265 * Serialize an edge for JSON output

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected