function stringToBool(val: string | undefined, defaultValue: boolean = false): boolean { if (!val) return defaultValue; const normalized = val.trim().toLowerCase(); return normalized === "true" || normalized === "yes"; } export { stringToBool };