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

Function formatCSVValue

apps/sim/stores/terminal/console/store.ts:402–414  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

400 }
401
402 const formatCSVValue = (value: any): string => {
403 if (value === null || value === undefined) {
404 return ''
405 }
406
407 let stringValue = typeof value === 'object' ? safeConsoleStringify(value) : String(value)
408
409 if (stringValue.includes('"') || stringValue.includes(',') || stringValue.includes('\n')) {
410 stringValue = `"${stringValue.replace(/"/g, '""')}"`
411 }
412
413 return stringValue
414 }
415
416 const headers = [
417 'timestamp',

Callers 1

store.tsFile · 0.70

Calls 2

safeConsoleStringifyFunction · 0.90
replaceMethod · 0.65

Tested by

no test coverage detected