MCPcopy Create free account
hub / github.com/tinyplex/tinybase / rowIdArraySorter

Function rowIdArraySorter

src/indexes/index.ts:169–180  ·  view source on GitHub ↗
(rowId1: Id, rowId2: Id)

Source from the content-addressed store, hash-verified

167 }
168 collForEach(unsortedSlices, (sliceId) => {
169 const rowIdArraySorter = (rowId1: Id, rowId2: Id): number =>
170 (
171 rowIdSorter as (
172 sortKey1: SortKey,
173 sortKey2: SortKey,
174 sliceId: Id,
175 ) => number
176 )(
177 mapGet(sortKeys, rowId1) as SortKey,
178 mapGet(sortKeys, rowId2) as SortKey,
179 sliceId,
180 );
181 const sliceArray = [...(mapGet(index, sliceId) as IdSet)];
182 if (!arrayIsSorted(sliceArray, rowIdArraySorter)) {
183 mapSet(

Callers

nothing calls this directly

Calls 1

mapGetFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…