(rawValue = {})
| 55 | } |
| 56 | |
| 57 | function normalizeBooleanMap(rawValue = {}) { |
| 58 | if (!rawValue || typeof rawValue !== 'object' || Array.isArray(rawValue)) { |
| 59 | return {}; |
| 60 | } |
| 61 | |
| 62 | return Object.entries(rawValue).reduce((result, [key, value]) => { |
| 63 | const normalizedKey = String(key || '').trim().toLowerCase(); |
| 64 | if (!normalizedKey) { |
| 65 | return result; |
| 66 | } |
| 67 | result[normalizedKey] = Boolean(value); |
| 68 | return result; |
| 69 | }, {}); |
| 70 | } |
| 71 | |
| 72 | function toNormalizedEmailSet(values = []) { |
| 73 | if (values instanceof Set) { |
no outgoing calls
no test coverage detected