(raw: string | undefined | null)
| 83 | } |
| 84 | |
| 85 | export function parseEmailList(raw: string | undefined | null): Set<string> { |
| 86 | if (!raw) return new Set(); |
| 87 | const emails = new Set<string>(); |
| 88 | for (const part of raw.split(",")) { |
| 89 | const normalized = normalizeEmail(part); |
| 90 | if (normalized) emails.add(normalized); |
| 91 | } |
| 92 | return emails; |
| 93 | } |
| 94 | |
| 95 | function normalizeEmail(value: string | null | undefined): string | null { |
| 96 | const normalized = value?.trim().toLowerCase(); |
no test coverage detected