MCPcopy Create free account
hub / github.com/TanStack/db / stripVirtualOnlyUpdates

Function stripVirtualOnlyUpdates

packages/db/tests/collection-indexes.test.ts:28–34  ·  view source on GitHub ↗
(changes: Array<any>)

Source from the content-addressed store, hash-verified

26})
27
28const stripVirtualOnlyUpdates = (changes: Array<any>) =>
29 changes.map(normalizeChange).filter((change) => {
30 if (change.type !== `update`) {
31 return true
32 }
33 return JSON.stringify(change.value) !== JSON.stringify(change.previousValue)
34 })
35
36interface TestItem {
37 id: string

Callers 1

Calls 2

filterMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected