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

Function descend

test/unit/core/other/indexes.test.ts:43–44  ·  view source on GitHub ↗
(sortKey1: SortKey, sortKey2: SortKey)

Source from the content-addressed store, hash-verified

41const ascend = (sortKey1: SortKey, sortKey2: SortKey): number =>
42 (sortKey1 ?? 0) > (sortKey2 ?? 0) ? 1 : -1;
43const descend = (sortKey1: SortKey, sortKey2: SortKey): number =>
44 (sortKey1 ?? 0) < (sortKey2 ?? 0) ? 1 : -1;
45const oddAscend = (sortKey1: SortKey, sortKey2: SortKey, sliceId: Id) =>
46 sliceId == 'odd' ? ((sortKey1 ?? 0) > (sortKey2 ?? 0) ? 1 : -1) : 0;
47const oddDescend = (sortKey1: SortKey, sortKey2: SortKey, sliceId: Id) =>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…