extractOptions function infrastructure ✓ 100.0%

Last updated: 2026-02-24T19:46:21.768Z

Metrics

LOC: 11 Complexity: 3 Params: 2 Coverage: 100.0% (5/5 lines, 8x executed)

Signature

extractOptions( hiddenSelect: HTMLSelectElement | null, ): : Array<{ value: string; text: string }> | undefined

Source Code

function extractOptions(
  hiddenSelect: HTMLSelectElement | null,
): Array<{ value: string; text: string }> | undefined {
  if (!hiddenSelect) return undefined;

  const opts = Array.from(hiddenSelect.options)
    .filter((o) => o.value !== "")
    .map((o) => ({ value: o.value, text: o.text.trim() }));

  return opts.length > 0 ? opts : undefined;
}

No outgoing dependencies.

Impact (Incoming)

graph LR extractOptions["extractOptions"] buildField["buildField"] buildField -->|calls| extractOptions style extractOptions fill:#dbeafe,stroke:#2563eb,stroke-width:2px click extractOptions "5f2b8a2ce99a7450.html" click buildField "d0b8742a59271171.html"
SourceType
buildField calls