(v: string | boolean)
| 1 | // Utility functions for view-base and related modules |
| 2 | |
| 3 | export function booleanConverter(v: string | boolean): boolean { |
| 4 | if (typeof v === 'string') { |
| 5 | v = v.trim().toLowerCase(); |
| 6 | return v === 'true' || v === '1'; |
| 7 | } |
| 8 | return !!v; |
| 9 | } |
no outgoing calls
no test coverage detected