(value: unknown)
| 60 | } |
| 61 | |
| 62 | function sanitizeStringArray(value: unknown): string[] { |
| 63 | if (!Array.isArray(value)) { |
| 64 | return []; |
| 65 | } |
| 66 | return [ |
| 67 | ...new Set( |
| 68 | value.filter((entry): entry is string => typeof entry === "string" && entry.length > 0), |
| 69 | ), |
| 70 | ]; |
| 71 | } |
| 72 | |
| 73 | function sanitizeBooleanRecord(value: unknown): Record<string, boolean> { |
| 74 | if (!value || typeof value !== "object") { |
no outgoing calls
no test coverage detected