| 4074 | } |
| 4075 | |
| 4076 | public Object safeBool2(Object dictionaryOrList, Object key1, Object key2, Object... optionalArgs) |
| 4077 | { |
| 4078 | /** |
| 4079 | * @ignore |
| 4080 | * @method |
| 4081 | * @description safely extract boolean value from dictionary or list |
| 4082 | * @returns {bool | undefined} |
| 4083 | */ |
| 4084 | Object defaultValue = Helpers.getArg(optionalArgs, 0, null); |
| 4085 | Object value = this.safeValue(dictionaryOrList, key1); |
| 4086 | if (Helpers.isTrue((value instanceof Boolean))) |
| 4087 | { |
| 4088 | return value; |
| 4089 | } |
| 4090 | Object value2 = this.safeValue(dictionaryOrList, key2); |
| 4091 | if (Helpers.isTrue((value2 instanceof Boolean))) |
| 4092 | { |
| 4093 | return value2; |
| 4094 | } |
| 4095 | return defaultValue; |
| 4096 | } |
| 4097 | |
| 4098 | public Object safeBool(Object dictionaryOrList, Object key, Object... optionalArgs) |
| 4099 | { |