{
  "definitions": [
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/inventory.converter.ts",
          "name": "slugOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/content#file-content-core-converters-inventory-converter-ts",
            "json": "https://banes-lab.com/json/source/content/core/converters/inventory.converter.ts",
            "label": "core/converters/inventory.converter.ts",
            "markdown": "https://banes-lab.com/source/content/core/converters/inventory.converter.ts.md",
            "ref": "anatomy:file-content-core-converters-inventory-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 33,
      "name": "slugPrefixAccepted",
      "signature": "const slugPrefixAccepted = function slugPrefixAccepted(prefix: string): boolean {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/converters/inventory.converter.ts",
          "name": "slugPrefixAccepted",
          "source": {
            "href": "https://banes-lab.com/anatomy/content#file-content-core-converters-inventory-converter-ts",
            "json": "https://banes-lab.com/json/source/content/core/converters/inventory.converter.ts",
            "label": "core/converters/inventory.converter.ts",
            "markdown": "https://banes-lab.com/source/content/core/converters/inventory.converter.ts.md",
            "ref": "anatomy:file-content-core-converters-inventory-converter-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 45,
      "name": "slugOf",
      "signature": "const slugOf = function slugOf(line: string): SlugSpan | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 20,
      "name": "NOT_FOUND",
      "signature": "const NOT_FOUND = -1;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 22,
      "name": "headingText",
      "signature": "const headingText = function headingText(line: string): string | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 40,
      "name": "SlugSpan",
      "signature": "interface SlugSpan {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 46,
      "name": "open",
      "signature": "const open = line.indexOf(BACKTICK);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 50,
      "name": "close",
      "signature": "const close = line.indexOf(BACKTICK, open + 1);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 57,
      "name": "LockedSpan",
      "signature": "interface LockedSpan {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 62,
      "name": "lockedOf",
      "signature": "const lockedOf = function lockedOf(tail: string): LockedSpan {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 72,
      "name": "GateSpan",
      "signature": "interface GateSpan {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 77,
      "name": "gateOf",
      "signature": "const gateOf = function gateOf(directive: string): GateSpan {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 85,
      "name": "ruleOf",
      "signature": "const ruleOf = function ruleOf(line: string, source: string, tier: string): InventoryRecord | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 86,
      "name": "span",
      "signature": "const span = slugOf(line);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 90,
      "name": "{ locked, rest }",
      "signature": "const { locked, rest } = lockedOf(span.tail);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 94,
      "name": "{ directive, gate }",
      "signature": "const { directive, gate } = gateOf(rest.slice(COLON.length));"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 98,
      "name": "arrowOutsideParens",
      "signature": "const arrowOutsideParens = function arrowOutsideParens(text: string): number {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 99,
      "name": "depth",
      "signature": "let depth = 0;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 100,
      "name": "at",
      "signature": "for (let at = 0; at < text.length; at += 1) {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 101,
      "name": "char",
      "signature": "const char = text.charAt(at);"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 111,
      "name": "stripLead",
      "signature": "const stripLead = function stripLead(text: string, lead: string): string | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 112,
      "name": "trimmed",
      "signature": "const trimmed = text.trim();"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 116,
      "name": "avoidanceOf",
      "signature": "const avoidanceOf = function avoidanceOf(line: string, source: string, tier: string): InventoryRecord | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 120,
      "name": "colon",
      "signature": "const colon = line.indexOf(COLON);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 124,
      "name": "slug",
      "signature": "const slug = line.slice(RULE_PREFIX.length, colon).trim();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 125,
      "name": "directive",
      "signature": "const directive = line.slice(colon + COLON.length).trim();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 126,
      "name": "arrow",
      "signature": "const arrow = arrowOutsideParens(directive);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 130,
      "name": "never",
      "signature": "const never = stripLead(directive.slice(0, arrow), NEVER_WORD);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 131,
      "name": "always",
      "signature": "const always = stripLead(directive.slice(arrow + ARROW.length), ALWAYS_WORD);"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 138,
      "name": "scanRules",
      "signature": "export const scanRules = function scanRules(text: string, source: string): InventoryRecord[] {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 139,
      "name": "records",
      "signature": "const records: InventoryRecord[] = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 140,
      "name": "tier",
      "signature": "let tier = \"\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 142,
      "name": "line",
      "signature": "const line = raw.trim();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 143,
      "name": "heading",
      "signature": "const heading = headingText(line);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 148,
      "name": "record",
      "signature": "const record = ruleOf(line, source, tier) ?? avoidanceOf(line, source, tier);"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 156,
      "name": "lineCount",
      "signature": "export const lineCount = function lineCount(text: string): number {"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/content#file-content-core-converters-inventory-converter-ts",
  "language": "typescript",
  "layer": "processing",
  "name": "inventory.converter.ts",
  "path": "core/converters/inventory.converter.ts",
  "ref": "anatomy:file-content-core-converters-inventory-converter-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/content#folder-content-core-converters",
          "json": "https://banes-lab.com/json/anatomy/content/folder-content-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/content/folder-content-core-converters.md",
          "ref": "chapter:/anatomy/content#folder-content-core-converters"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/content#folder-content-core-converters",
          "json": "https://banes-lab.com/json/anatomy/content/folder-content-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/content/folder-content-core-converters.md",
          "ref": "chapter:/anatomy/content#folder-content-core-converters"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "converter",
    "subject": "inventory",
    "variant": null
  },
  "stats": {
    "bytes": 4842,
    "callable": 11,
    "definitions": 35,
    "edges": 1,
    "exported": 7,
    "files": 1,
    "findings": {},
    "flows": {
      "leaf": 1,
      "entry": 1,
      "isolated": 33
    },
    "lines": {
      "blank": 15,
      "code": 143,
      "total": 158
    }
  },
  "summary": "143 lines of code and 35 definitions.",
  "text": "https://banes-lab.com/source/content/core/converters/inventory.converter.ts.txt",
  "tree": "content",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/content#file-content-core-converters-lesson-converter-ts",
      "json": "https://banes-lab.com/json/source/content/core/converters/lesson.converter.ts",
      "label": "core/converters/lesson.converter.ts",
      "markdown": "https://banes-lab.com/source/content/core/converters/lesson.converter.ts.md",
      "ref": "anatomy:file-content-core-converters-lesson-converter-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/content#file-content-core-converters-invariant-converter-ts",
      "json": "https://banes-lab.com/json/source/content/core/converters/invariant.converter.ts",
      "label": "core/converters/invariant.converter.ts",
      "markdown": "https://banes-lab.com/source/content/core/converters/invariant.converter.ts.md",
      "ref": "anatomy:file-content-core-converters-invariant-converter-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/content/core/converters",
    "label": "core/converters",
    "markdown": "https://banes-lab.com/api/source/content/core/converters.md",
    "ref": "api:source/content/core/converters"
  }
}
