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

Function detectChangedColumns

apps/sim/lib/table/trigger.ts:174–185  ·  view source on GitHub ↗
(oldData: RowData, newData: RowData)

Source from the content-addressed store, hash-verified

172}
173
174function detectChangedColumns(oldData: RowData, newData: RowData): string[] {
175 const changed: string[] = []
176 const allKeys = new Set([...Object.keys(oldData), ...Object.keys(newData)])
177
178 for (const key of allKeys) {
179 if (JSON.stringify(oldData[key]) !== JSON.stringify(newData[key])) {
180 changed.push(key)
181 }
182 }
183
184 return changed
185}

Callers 1

fireTableTriggerFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected