MCPcopy Index your code
hub / github.com/simstudioai/sim / escapeCsv

Function escapeCsv

apps/sim/app/api/logs/export/route.ts:19–26  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

17export const revalidate = 0
18
19function escapeCsv(value: any): string {
20 if (value === null || value === undefined) return ''
21 const str = typeof value === 'string' ? neutralizeCsvFormula(value) : String(value)
22 if (/[",\n]/.test(str)) {
23 return `"${str.replace(/"/g, '""')}"`
24 }
25 return str
26}
27
28export const GET = withRouteHandler(async (request: NextRequest) => {
29 try {

Callers 1

route.tsFile · 0.85

Calls 3

neutralizeCsvFormulaFunction · 0.90
testMethod · 0.80
replaceMethod · 0.65

Tested by

no test coverage detected