MCPcopy
hub / github.com/chartbrew/chartbrew / zrevrange

Method zrevrange

server/modules/runtimeCache.js:222–232  ·  view source on GitHub ↗
(key, start, end)

Source from the content-addressed store, hash-verified

220 }
221
222 async zrevrange(key, start, end) {
223 const sortedSet = this.sortedSets.get(key);
224 if (!sortedSet) return [];
225
226 const members = Array.from(sortedSet.entries())
227 .sort((left, right) => right[1] - left[1])
228 .map(([member]) => member);
229
230 const normalizedEnd = end < 0 ? members.length : end + 1;
231 return members.slice(start, normalizedEnd);
232 }
233
234 async zrem(key, ...members) {
235 const sortedSet = this.sortedSets.get(key);

Callers 5

createMemoryStoreFunction · 0.95
createRedisStoreFunction · 0.95
attachClientFunction · 0.80
getTopChartVariantsMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected