You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
@@ -1,7 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
var RawObject = require('./rawObject');
|
||||
|
||||
// hgetall converts its replies to an Object. If the reply is empty, null is returned.
|
||||
// These function are only called with internal data and have therefore always the same instanceof X
|
||||
function replyToObject (reply) {
|
||||
@@ -9,7 +7,7 @@ function replyToObject (reply) {
|
||||
if (reply.length === 0 || !(reply instanceof Array)) {
|
||||
return null;
|
||||
}
|
||||
var obj = new RawObject();
|
||||
var obj = {};
|
||||
for (var i = 0; i < reply.length; i += 2) {
|
||||
obj[reply[i].toString('binary')] = reply[i + 1];
|
||||
}
|
||||
|
Reference in New Issue
Block a user