MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / downloadCsv

Function downloadCsv

apps/web/src/lib/admin-csv.ts:125–135  ·  view source on GitHub ↗
(content: string, filename: string)

Source from the content-addressed store, hash-verified

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. */
137export function downloadCsv(content: string, filename: string) {
138 const blob = new Blob([content], { type: 'text/csv;charset=utf-8;' });

Callers 7

exportUsageTableToCsvFunction · 0.90
handleDownloadResultsFunction · 0.90
handleDownloadIneligibleFunction · 0.90
handleDownloadUnmatchedFunction · 0.90
handleDownloadSuccessfulFunction · 0.90
handleDownloadFailedFunction · 0.90
handleDownloadUnmatchedFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected