@iterable/react-native-sdk
Version:
Iterable SDK for React Native.
24 lines (23 loc) • 604 B
JavaScript
;
/**
* Utility class.
*
* TODO: Change to a util function instead of a class
*/
export class IterableUtil {
/**
* 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.
*/
static readBoolean(dict, key) {
if (dict[key]) {
return dict[key];
} else {
return false;
}
}
}
//# sourceMappingURL=IterableUtil.js.map