{
  "definitions": [
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/graph.converter.ts",
          "name": "collapseByLabel",
          "source": {
            "href": "https://banes-lab.com/anatomy/docs#file-docs-core-converters-graph-converter-ts",
            "json": "https://banes-lab.com/json/source/docs/core/converters/graph.converter.ts",
            "label": "core/converters/graph.converter.ts",
            "markdown": "https://banes-lab.com/source/docs/core/converters/graph.converter.ts.md",
            "ref": "anatomy:file-docs-core-converters-graph-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 20,
      "name": "dedupeEdges",
      "signature": "const dedupeEdges = function dedupeEdges(edges: readonly CodeEdge[], idMap: ReadonlyMap<string, string>): CodeEdge[] {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/plugins/diagram.package.plugin.ts",
          "name": "appliesTo",
          "source": {
            "href": "https://banes-lab.com/anatomy/docs#file-docs-core-plugins-diagram-package-plugin-ts",
            "json": "https://banes-lab.com/json/source/docs/core/plugins/diagram.package.plugin.ts",
            "label": "core/plugins/diagram.package.plugin.ts",
            "markdown": "https://banes-lab.com/source/docs/core/plugins/diagram.package.plugin.ts.md",
            "ref": "anatomy:file-docs-core-plugins-diagram-package-plugin-ts"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 51,
      "name": "depGraphOf",
      "signature": "export const depGraphOf = function depGraphOf(modules: readonly ModuleDep[], keepIsolated = false): GraphModel {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/converters/graph.converter.ts",
          "name": "dedupeEdges",
          "source": {
            "href": "https://banes-lab.com/anatomy/docs#file-docs-core-converters-graph-converter-ts",
            "json": "https://banes-lab.com/json/source/docs/core/converters/graph.converter.ts",
            "label": "core/converters/graph.converter.ts",
            "markdown": "https://banes-lab.com/source/docs/core/converters/graph.converter.ts.md",
            "ref": "anatomy:file-docs-core-converters-graph-converter-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 33,
      "name": "collapseByLabel",
      "signature": "export const collapseByLabel = function collapseByLabel(graph: CodeGraph): CodeGraph {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 4,
      "name": "canonicalizeNodes",
      "signature": "const canonicalizeNodes = function canonicalizeNodes(graph: CodeGraph): CanonicalNodes {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 5,
      "name": "canon",
      "signature": "const canon = new Map<string, string>();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 6,
      "name": "idMap",
      "signature": "const idMap = new Map<string, string>();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 10,
      "name": "existing",
      "signature": "const existing = canon.get(key);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 21,
      "name": "byKey",
      "signature": "const byKey = new Map<string, CodeEdge>();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 23,
      "name": "from",
      "signature": "const from = idMap.get(edge.from) ?? edge.from;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 24,
      "name": "to",
      "signature": "const to = idMap.get(edge.to) ?? edge.to;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 25,
      "name": "key",
      "signature": "const key = `${from} ${to} ${edge.kind} ${edge.label ?? \"\"}`;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 34,
      "name": "{ idMap, nodes }",
      "signature": "const { idMap, nodes } = canonicalizeNodes(graph);"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 38,
      "name": "shortName",
      "signature": "const shortName = function shortName(name: string): string {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 39,
      "name": "slash",
      "signature": "const slash = name.lastIndexOf(\"/\");"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 43,
      "name": "presentEdges",
      "signature": "const presentEdges = function presentEdges(modules: readonly ModuleDep[], present: ReadonlySet<string>): GraphEdge[] {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 52,
      "name": "present",
      "signature": "const present = new Set(modules.map((module) => module.name));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 53,
      "name": "edges",
      "signature": "const edges = presentEdges(modules, present);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 54,
      "name": "connected",
      "signature": "const connected = new Set(edges.flatMap((edge) => [edge.from, edge.to]));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 55,
      "name": "nodes",
      "signature": "const nodes: GraphNode[] = modules"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/docs#file-docs-core-converters-graph-converter-ts",
  "language": "typescript",
  "layer": "processing",
  "name": "graph.converter.ts",
  "path": "core/converters/graph.converter.ts",
  "ref": "anatomy:file-docs-core-converters-graph-converter-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/docs#folder-docs-core-converters",
          "json": "https://banes-lab.com/json/anatomy/docs/folder-docs-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/docs/folder-docs-core-converters.md",
          "ref": "chapter:/anatomy/docs#folder-docs-core-converters"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/docs#file-docs-core-plugins-diagram-package-plugin-ts",
          "json": "https://banes-lab.com/json/source/docs/core/plugins/diagram.package.plugin.ts",
          "label": "core/plugins/diagram.package.plugin.ts",
          "markdown": "https://banes-lab.com/source/docs/core/plugins/diagram.package.plugin.ts.md",
          "ref": "anatomy:file-docs-core-plugins-diagram-package-plugin-ts"
        }
      ],
      "relation": "used-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/docs#folder-docs-core-converters",
          "json": "https://banes-lab.com/json/anatomy/docs/folder-docs-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/docs/folder-docs-core-converters.md",
          "ref": "chapter:/anatomy/docs#folder-docs-core-converters"
        },
        {
          "href": "https://banes-lab.com/anatomy/docs#folder-docs-core-plugins",
          "json": "https://banes-lab.com/json/anatomy/docs/folder-docs-core-plugins",
          "label": "core/plugins",
          "markdown": "https://banes-lab.com/anatomy/docs/folder-docs-core-plugins.md",
          "ref": "chapter:/anatomy/docs#folder-docs-core-plugins"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "converter",
    "subject": "graph",
    "variant": null
  },
  "stats": {
    "bytes": 2594,
    "callable": 6,
    "definitions": 19,
    "edges": 1,
    "exported": 7,
    "files": 1,
    "findings": {},
    "flows": {
      "leaf": 2,
      "entry": 1,
      "isolated": 16
    },
    "lines": {
      "blank": 6,
      "code": 53,
      "total": 59
    }
  },
  "summary": "53 lines of code and 19 definitions.",
  "text": "https://banes-lab.com/source/docs/core/converters/graph.converter.ts.txt",
  "tree": "docs",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/docs#file-docs-core-converters-layer-converter-ts",
      "json": "https://banes-lab.com/json/source/docs/core/converters/layer.converter.ts",
      "label": "core/converters/layer.converter.ts",
      "markdown": "https://banes-lab.com/source/docs/core/converters/layer.converter.ts.md",
      "ref": "anatomy:file-docs-core-converters-layer-converter-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/docs#file-docs-core-converters-document-converter-ts",
      "json": "https://banes-lab.com/json/source/docs/core/converters/document.converter.ts",
      "label": "core/converters/document.converter.ts",
      "markdown": "https://banes-lab.com/source/docs/core/converters/document.converter.ts.md",
      "ref": "anatomy:file-docs-core-converters-document-converter-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/docs/core/converters",
    "label": "core/converters",
    "markdown": "https://banes-lab.com/api/source/docs/core/converters.md",
    "ref": "api:source/docs/core/converters"
  }
}
