* Reads a boolean value from a dictionary. * * @param dict - The dictionary to read from. * @param key - The key whose associated value is to be returned. * @returns The boolean value associated with the specified key, or `false` if the key does not exist or the value is not a boolean.
(dict: Record<string, unknown>, key: string)
| 12 | * @returns The boolean value associated with the specified key, or `false` if the key does not exist or the value is not a boolean. |
| 13 | */ |
| 14 | static readBoolean(dict: Record<string, unknown>, key: string): boolean { |
| 15 | if (dict[key]) { |
| 16 | return dict[key] as boolean; |
| 17 | } else { |
| 18 | return false; |
| 19 | } |
| 20 | } |
| 21 | } |
no outgoing calls
no test coverage detected