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

Function lineAt

scripts/check-migrations-safety.ts:71–75  ·  view source on GitHub ↗
(offset: number)

Source from the content-addressed store, hash-verified

69 let dollarTag: string | null = null
70
71 const lineAt = (offset: number): number => {
72 let line = 1
73 for (let i = 0; i < offset; i++) if (content[i] === '\n') line++
74 return line
75 }
76 const flush = () => {
77 const sql = buf.trim()
78 if (sql.length > 0 && startOffset >= 0) statements.push({ sql, startLine: lineAt(startOffset) })

Callers 1

flushFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected