You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-12-12 21:21:15 +03:00
committed by
GitHub
parent
d7c6544d3a
commit
1cda848393
@@ -7,7 +7,7 @@ export default {
|
||||
IS_READ_ONLY: true,
|
||||
/**
|
||||
* Constructs the PUBSUB NUMSUB command
|
||||
*
|
||||
*
|
||||
* @param parser - The command parser
|
||||
* @param channels - Optional channel names to get subscription count for
|
||||
* @see https://redis.io/commands/pubsub-numsub/
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* Transforms the PUBSUB NUMSUB reply into a record of channel name to subscriber count
|
||||
*
|
||||
*
|
||||
* @param rawReply - The raw reply from Redis
|
||||
* @returns Record mapping channel names to their subscriber counts
|
||||
*/
|
||||
@@ -29,7 +29,7 @@ export default {
|
||||
const reply = Object.create(null);
|
||||
let i = 0;
|
||||
while (i < rawReply.length) {
|
||||
reply[rawReply[i++].toString()] = rawReply[i++].toString();
|
||||
reply[rawReply[i++].toString()] = Number(rawReply[i++]);
|
||||
}
|
||||
|
||||
return reply as Record<string, NumberReply>;
|
||||
|
||||
Reference in New Issue
Block a user