(values = [])
| 70 | } |
| 71 | |
| 72 | function toNormalizedEmailSet(values = []) { |
| 73 | if (values instanceof Set) { |
| 74 | return new Set(Array.from(values, (item) => String(item || '').trim().toLowerCase()).filter(Boolean)); |
| 75 | } |
| 76 | if (Array.isArray(values)) { |
| 77 | return new Set(values.map((item) => String(item || '').trim().toLowerCase()).filter(Boolean)); |
| 78 | } |
| 79 | if (values && typeof values === 'object') { |
| 80 | const normalizedMap = normalizeBooleanMap(values); |
| 81 | return new Set(Object.entries(normalizedMap) |
| 82 | .filter(([, value]) => value) |
| 83 | .map(([email]) => email)); |
| 84 | } |
| 85 | return new Set(); |
| 86 | } |
| 87 | |
| 88 | function findIcloudAliasArray(node, depth = 0) { |
| 89 | if (!node || depth > 4) return null; |
no test coverage detected