(obj: unknown, key: string)
| 76 | value !== null && typeof value === "object"; |
| 77 | |
| 78 | export const readString = (obj: unknown, key: string): string => { |
| 79 | if (!isRecord(obj)) { |
| 80 | return ""; |
| 81 | } |
| 82 | |
| 83 | const value = obj[key]; |
| 84 | |
| 85 | return typeof value === "string" ? value : ""; |
| 86 | }; |
| 87 | |
| 88 | export const readBoolean = (obj: unknown, key: string): boolean => { |
| 89 | if (!isRecord(obj)) { |
no test coverage detected