MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / rankBeforeInDisplay

Function rankBeforeInDisplay

src/bases/sortOrderUtils.ts:297–299  ·  view source on GitHub ↗
(targetRank: RankLike, direction: SortDirection)

Source from the content-addressed store, hash-verified

295}
296
297function rankBeforeInDisplay(targetRank: RankLike, direction: SortDirection): RankLike {
298 return direction === "asc" ? safeGenPrev(targetRank) : safeGenNext(targetRank);
299}
300
301function rankAfterInDisplay(targetRank: RankLike, direction: SortDirection): RankLike {
302 return direction === "asc" ? safeGenNext(targetRank) : safeGenPrev(targetRank);

Callers 1

prepareSortOrderUpdateFunction · 0.85

Calls 2

safeGenPrevFunction · 0.85
safeGenNextFunction · 0.85

Tested by

no test coverage detected