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

Function compareFractionalIndex

packages/db-ivm/tests/test-utils.ts:303–310  ·  view source on GitHub ↗
(
  r1: [unknown, [unknown, string]],
  r2: [unknown, [unknown, string]],
)

Source from the content-addressed store, hash-verified

301}
302
303export const compareFractionalIndex = (
304 r1: [unknown, [unknown, string]],
305 r2: [unknown, [unknown, string]],
306) => {
307 const [_key1, [_value1, index1]] = r1
308 const [_key2, [_value2, index2]] = r2
309 return index1 < index2 ? -1 : index1 > index2 ? 1 : 0
310}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected