MCPcopy Create free account
hub / github.com/codemix/graph / toJSON

Method toJSON

packages/graph/src/Graph.ts:720–726  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

718 }
719
720 public toJSON() {
721 return {
722 "@type": "Graph" as const,
723 vertices: Array.from(this.getVertices(), (v) => v.toJSON()),
724 edges: Array.from(this.getEdges(), (e) => e.toJSON()),
725 };
726 }
727}
728
729export const $StoredElement = Symbol("$StoredElement");

Callers

nothing calls this directly

Calls 3

getVerticesMethod · 0.95
getEdgesMethod · 0.95
toJSONMethod · 0.45

Tested by

no test coverage detected