buildGeneratorOptionsHtml function presentation exported
Last updated: 2026-03-04T23:21:38.428Z
Location
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)
| Target | Type |
|---|---|
| buildFieldTypeOptionsHtml | calls |
No incoming dependencies.