MCPcopy Create free account
hub / github.com/Iterable/react-native-sdk / readBoolean

Method readBoolean

src/core/classes/IterableUtil.ts:14–20  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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}

Callers 2

fromDictMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected