redis-smq-common 1.0.0-rc.6 → 1.0.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -43,7 +43,7 @@ class IoredisClientMulti {
|
|
|
43
43
|
return this;
|
|
44
44
|
}
|
|
45
45
|
srem(key, element) {
|
|
46
|
-
this.multi.srem(key, ...element);
|
|
46
|
+
this.multi.srem(key, ...(typeof element === 'string' ? [element] : element));
|
|
47
47
|
return this;
|
|
48
48
|
}
|
|
49
49
|
hset(key, field, value) {
|
|
@@ -63,7 +63,7 @@ class IoredisClientMulti {
|
|
|
63
63
|
return this;
|
|
64
64
|
}
|
|
65
65
|
del(key) {
|
|
66
|
-
this.multi.del(...key);
|
|
66
|
+
this.multi.del(...(typeof key === 'string' ? [key] : key));
|
|
67
67
|
return this;
|
|
68
68
|
}
|
|
69
69
|
exec(cb) {
|
|
@@ -110,7 +110,7 @@ class NodeRedisV3Client extends redis_client_1.RedisClient {
|
|
|
110
110
|
this.client.hset(key, field, value, cb);
|
|
111
111
|
}
|
|
112
112
|
hdel(key, fields, cb) {
|
|
113
|
-
this.client.hdel(key, fields, cb);
|
|
113
|
+
this.client.hdel(key, ...(typeof fields === 'string' ? [fields] : fields), cb);
|
|
114
114
|
}
|
|
115
115
|
lrange(key, start, stop, cb) {
|
|
116
116
|
this.client.lrange(key, start, stop, cb);
|
|
@@ -166,7 +166,7 @@ class NodeRedisV3Client extends redis_client_1.RedisClient {
|
|
|
166
166
|
this.client.get(key, cb);
|
|
167
167
|
}
|
|
168
168
|
del(key, cb) {
|
|
169
|
-
this.client.del(key, cb);
|
|
169
|
+
this.client.del(...(typeof key === 'string' ? [key] : key), cb);
|
|
170
170
|
}
|
|
171
171
|
llen(key, cb) {
|
|
172
172
|
this.client.llen(key, cb);
|
|
@@ -215,8 +215,8 @@ class NodeRedisV4Client extends redis_client_1.RedisClient {
|
|
|
215
215
|
}
|
|
216
216
|
del(key, cb) {
|
|
217
217
|
this.client
|
|
218
|
-
.
|
|
219
|
-
.then((reply) => cb(null,
|
|
218
|
+
.del(key)
|
|
219
|
+
.then((reply) => cb(null, reply))
|
|
220
220
|
.catch(cb);
|
|
221
221
|
}
|
|
222
222
|
llen(key, cb) {
|
package/package.json
CHANGED