UNPKG

@silverwind/ioredis-mock

Version:

This library emulates ioredis by performing all operations in-memory.

22 lines (16 loc) 401 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.zscore = zscore; function zscore(key, member) { const map = this.data.get(key); // @TODO investigate a more stable way to detect sorted lists if (!map || !(map instanceof Map)) { return null; } const entry = map.get(member); if (!entry) { return null; } return entry.score.toString(); }