renderMethodBadge function presentation exported ✓ 100.0%

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

Metrics

LOC: 4 Complexity: 2 Params: 2 Coverage: 100.0% (2/2 lines, 7x executed)

Signature

renderMethodBadge(method: string, prefix = ""): : string

Summary

Renders a colored badge for a detection method.

Source Code

export function renderMethodBadge(method: string, prefix = ""): string {
  const color = METHOD_COLORS[method] ?? "#334155";
  return `<span class="${prefix}method-badge" style="background:${color};color:#fff">${escapeHtml(method)}</span>`;
}

Dependencies (Outgoing)

graph LR renderMethodBadge["renderMethodBadge"] escapeHtml["escapeHtml"] renderMethodBadge -->|calls| escapeHtml style renderMethodBadge fill:#dbeafe,stroke:#2563eb,stroke-width:2px click renderMethodBadge "86ef5700ac98762f.html" click escapeHtml "67836c1424e9ebff.html"
TargetType
escapeHtml calls

Impact (Incoming)

graph LR renderMethodBadge["renderMethodBadge"] renderFieldRow["renderFieldRow"] renderFieldRow -->|calls| renderMethodBadge style renderMethodBadge fill:#dbeafe,stroke:#2563eb,stroke-width:2px click renderMethodBadge "86ef5700ac98762f.html" click renderFieldRow "b51f1878ac9d34b2.html"
SourceType
renderFieldRow calls