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

Function isCandidateInDisplayPosition

src/bases/sortOrderUtils.ts:151–164  ·  view source on GitHub ↗
(
	candidate: string,
	previous: string | null,
	next: string | null,
	direction: SortDirection
)

Source from the content-addressed store, hash-verified

149}
150
151function isCandidateInDisplayPosition(
152 candidate: string,
153 previous: string | null,
154 next: string | null,
155 direction: SortDirection
156): boolean {
157 if (previous && compareDisplaySortStrings(previous, candidate, direction) >= 0) {
158 return false;
159 }
160 if (next && compareDisplaySortStrings(candidate, next, direction) >= 0) {
161 return false;
162 }
163 return true;
164}
165
166function parseRank(value: string): RankLike {
167 return LexoRankValue.parse(value);

Callers 1

prepareSortOrderUpdateFunction · 0.85

Calls 1

Tested by

no test coverage detected