You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
Move command out of the index.js
This commit is contained in:
14
lib/utils.js
14
lib/utils.js
@ -46,8 +46,20 @@ function toArray(args) {
|
||||
return arr;
|
||||
}
|
||||
|
||||
function print (err, reply) {
|
||||
if (err) {
|
||||
console.log("Error: " + err);
|
||||
} else {
|
||||
console.log("Reply: " + reply);
|
||||
}
|
||||
}
|
||||
|
||||
var redisErrCode = /^([A-Z]+)\s+(.+)$/;
|
||||
|
||||
module.exports = {
|
||||
reply_to_strings: replyToStrings,
|
||||
reply_to_object: replyToObject,
|
||||
to_array: toArray
|
||||
to_array: toArray,
|
||||
print: print,
|
||||
errCode: redisErrCode
|
||||
};
|
||||
|
Reference in New Issue
Block a user