escapeTextContent function ✓ 100.0%

Last updated: 2026-03-04T23:21:38.399Z

Metrics

LOC: 5 Complexity: 1 Params: 1 Coverage: 100.0% (1/1 lines, 0x executed)

Signature

escapeTextContent(text: string): : string

Source Code

function escapeTextContent(text: string): string {
  const div = document.createElement("span");
  div.textContent = text;
  return div.innerHTML;
}

No outgoing dependencies.

Impact (Incoming)

graph LR escapeTextContent["escapeTextContent"] showAiGenerating["showAiGenerating"] addDetecting["addDetecting"] updateDetected["updateDetected"] addFilling["addFilling"] updateFilled["updateFilled"] updateError["updateError"] showAiGenerating -->|calls| escapeTextContent addDetecting -->|calls| escapeTextContent updateDetected -->|calls| escapeTextContent addFilling -->|calls| escapeTextContent updateFilled -->|calls| escapeTextContent updateError -->|calls| escapeTextContent style escapeTextContent fill:#dbeafe,stroke:#2563eb,stroke-width:2px click escapeTextContent "2d67e190a10f9002.html" click showAiGenerating "fecc24ed0e81da8f.html" click addDetecting "c905905d51da03c4.html" click updateDetected "9b49f309b5fbb5e7.html" click addFilling "524532e8edf7313a.html" click updateFilled "4e5e87e82f7512e3.html" click updateError "a1d61ed37f97aef4.html"
SourceType
showAiGenerating calls
addDetecting calls
updateDetected calls
addFilling calls
updateFilled calls
updateError calls