(attrValue: string | undefined, def: boolean = false)
| 40 | * @param def Default boolean value when attribute is undefined. |
| 41 | */ |
| 42 | export function boolFromValue(attrValue: string | undefined, def: boolean = false) { |
| 43 | return attrValue === undefined ? def : attrValue.trim() !== 'false'; |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Return the boolean state of attribute from an element |
no outgoing calls
no test coverage detected