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

Function escapeCell

apps/sim/tools/google_drive/utils.ts:251–257  ·  view source on GitHub ↗
(cell: unknown)

Source from the content-addressed store, hash-verified

249 }
250
251 const escapeCell = (cell: unknown): string => {
252 if (cell === null || cell === undefined) return ''
253 const stringValue = String(cell)
254 const mustQuote = /[",\n\r]/.test(stringValue)
255 const doubledQuotes = stringValue.replace(/"/g, '""')
256 return mustQuote ? `"${doubledQuotes}"` : doubledQuotes
257 }
258
259 const rowsAsStrings = (table as unknown[]).map((row) => {
260 if (!Array.isArray(row)) {

Callers 1

handleSheetsFormatFunction · 0.85

Calls 2

testMethod · 0.80
replaceMethod · 0.65

Tested by

no test coverage detected