buildGeneratorOptionsHtml function presentation exported

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

Metrics

LOC: 12 Complexity: 3 Params: 1

Signature

buildGeneratorOptionsHtml(selected = "auto"): : string

Summary

Builds the full <option>/<optgroup> HTML for a generator select. Includes "Automático", "Chrome AI" and "TensorFlow.js" entries first.

Source Code

export function buildGeneratorOptionsHtml(selected = "auto"): string {
  const extras = GENERATOR_EXTRA_OPTIONS.map(
    (o) =>
      `<option value="${o.value}"${o.value === selected ? " selected" : ""}>${o.label}</option>`,
  ).join("");
  const groups = buildFieldTypeOptionsHtml(
    GENERATOR_EXTRA_OPTIONS.some((o) => o.value === selected)
      ? undefined
      : selected,
  );
  return extras + groups;
}

Dependencies (Outgoing)

graph LR buildGeneratorOptionsHtml["buildGeneratorOptionsHtml"] buildFieldTypeOptionsHtml["buildFieldTypeOptionsHtml"] buildGeneratorOptionsHtml -->|calls| buildFieldTypeOptionsHtml style buildGeneratorOptionsHtml fill:#dbeafe,stroke:#2563eb,stroke-width:2px click buildGeneratorOptionsHtml "03d3d85811e5fbfe.html" click buildFieldTypeOptionsHtml "7a9c0cc46c487acd.html"
TargetType
buildFieldTypeOptionsHtml calls

No incoming dependencies.