2023-12-08 23:30:43 -08:00

6 lines
175 B
JavaScript

export function stringToBoolean(str) {
if (str) {
if (!["0", "false", "off", "no", "null", "undefined", "nan"].includes(str.toLowerCase())) return true;
}
return false;
}