ioredis-mock
Version:
This library emulates ioredis by performing all operations in-memory.
19 lines (15 loc) • 388 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.zremrangebyrank = zremrangebyrank;
var _index = require('./index');
function zremrangebyrank(key, s, e) {
var vals = _index.zrange.call(this, key, s, e);
var map = this.data.get(key);
vals.forEach(function (val) {
map.delete(val);
});
this.data.set(key, map);
return vals.length;
}