(content: string, filename: string)
| 123 | for (const part of parts) { |
| 124 | const val = part |
| 125 | .replace(/^[<"'\s]+|[>"'\s]+$/g, '') |
| 126 | .toLowerCase() |
| 127 | .trim(); |
| 128 | if (val && val.includes('@') && val.includes('.') && !seen.has(val)) { |
| 129 | seen.add(val); |
| 130 | emails.push(val); |
| 131 | } |
| 132 | } |
| 133 | return emails; |
| 134 | } |
| 135 | |
| 136 | /** Trigger a browser CSV download. Must only be called from client-side code. */ |
| 137 | export function downloadCsv(content: string, filename: string) { |
| 138 | const blob = new Blob([content], { type: 'text/csv;charset=utf-8;' }); |
no outgoing calls
no test coverage detected