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

Function customCompare

packages/db/tests/collection-events.test.ts:75–77  ·  view source on GitHub ↗
(a: any, b: any)

Source from the content-addressed store, hash-verified

73 collection.on(`index:added`, indexAddedListener)
74
75 function customCompare(a: any, b: any) {
76 return Number(a) - Number(b)
77 }
78
79 const index = collection.createIndex((row: any) => row.id, {
80 name: `by-id`,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected