@iterable/react-native-sdk
Version:
Iterable SDK for React Native.
29 lines (28 loc) • 730 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.IterableUtil = void 0;
/**
* Utility class.
*
* TODO: Change to a util function instead of a class
*/
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;
}
}
}
exports.IterableUtil = IterableUtil;
//# sourceMappingURL=IterableUtil.js.map