MCPcopy Create free account
hub / github.com/bywwcnll/StreamPanel / escapeCSV

Function escapeCSV

devtools/modules/exportManager.js:36–45  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

34}
35
36function escapeCSV(value) {
37 if (value === null || value === undefined) {
38 return '';
39 }
40 const str = String(value);
41 if (str.includes(',') || str.includes('\n') || str.includes('"')) {
42 return '"' + str.replace(/"/g, '""') + '"';
43 }
44 return str;
45}
46
47export function getCurrentConnectionExportData() {
48 const connection = state.connections[state.selectedConnectionId];

Callers 2

messagesToCSVFunction · 0.70
exportAllToCSVFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected