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

Function decodeAlphaRank

src/bases/sortOrderUtils.ts:114–124  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

112}
113
114function decodeAlphaRank(value: string): number | null {
115 if (!ALPHA_RANK_PATTERN.test(value)) {
116 return null;
117 }
118
119 let result = 0;
120 for (const char of value.slice(ALPHA_RANK_PREFIX.length)) {
121 result = result * ALPHA_RANK_BASE + (char.charCodeAt(0) - 97);
122 }
123 return result;
124}
125
126function createAlphaRankForDisplayIndex(
127 index: number,

Callers 4

betweenMethod · 0.85
tryParseSortRankFunction · 0.85
safeGenNextFunction · 0.85
safeGenPrevFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected