mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 22:45:46 +01:00
27 lines
697 B
JavaScript
27 lines
697 B
JavaScript
"use strict";
|
|
|
|
module.exports = function(redisClient, module) {
|
|
module.listPrepend = function(key, value, callback) {
|
|
redisClient.lpush(key, value, callback);
|
|
};
|
|
|
|
module.listAppend = function(key, value, callback) {
|
|
redisClient.rpush(key, value, callback);
|
|
};
|
|
|
|
module.listRemoveLast = function(key, callback) {
|
|
redisClient.rpop(key, callback);
|
|
};
|
|
|
|
module.listRemoveAll = function(key, value, callback) {
|
|
redisClient.lrem(key, 0, value, callback);
|
|
};
|
|
|
|
module.getListRange = function(key, start, stop, callback) {
|
|
redisClient.lrange(key, start, stop, callback);
|
|
};
|
|
|
|
module.listTrim = function(key, start, stop, callback) {
|
|
redisClient.ltrim(key, start, stop, callback);
|
|
};
|
|
}; |