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

Function compareInDisplayOrder

src/bases/sortOrderUtils.ts:291–295  ·  view source on GitHub ↗
(left: RankLike, right: RankLike, direction: SortDirection)

Source from the content-addressed store, hash-verified

289}
290
291function compareInDisplayOrder(left: RankLike, right: RankLike, direction: SortDirection): number {
292 return direction === "asc"
293 ? compareRankStringsForBases(left.toString(), right.toString())
294 : compareRankStringsForBases(right.toString(), left.toString());
295}
296
297function rankBeforeInDisplay(targetRank: RankLike, direction: SortDirection): RankLike {
298 return direction === "asc" ? safeGenPrev(targetRank) : safeGenNext(targetRank);

Callers 1

prepareSortOrderUpdateFunction · 0.85

Calls 2

toStringMethod · 0.65

Tested by

no test coverage detected