bitburner-src/utils/uiHelpers/createOptionElement.ts

12 lines
319 B
TypeScript
Raw Normal View History

2019-01-10 09:20:04 +01:00
import { createElement } from "./createElement";
export function createOptionElement(text: string, value: string="") {
const sanitizedValue: string = value;
if (sanitizedValue === "") { sanitizedValue = text; }
return createElement("option", {
text: text,
value: sanitizedValue,
});
}