(value: string | boolean)
| 3 | } |
| 4 | |
| 5 | export function booleanize(value: string | boolean): boolean { |
| 6 | if (typeof value === "boolean") return value; |
| 7 | |
| 8 | const F = [ |
| 9 | "false", |
| 10 | "null", |
| 11 | "0", |
| 12 | "undefined", |
| 13 | "no", |
| 14 | "none", |
| 15 | "off", |
| 16 | "disable", |
| 17 | "disabled", |
| 18 | "nan", |
| 19 | "", |
| 20 | ]; |
| 21 | return !F.includes(value.toLowerCase()); |
| 22 | } |
no outgoing calls
no test coverage detected