From ee1446805e960104b18f9242715a48e7408cda17 Mon Sep 17 00:00:00 2001 From: Frank Murphy Date: Thu, 11 Jun 2015 10:04:39 -0500 Subject: [PATCH 1/2] Add print function to ioredis to make it closer to a drop in replacemane for noderedis --- index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.js b/index.js index 1dc09f99..42d73b52 100644 --- a/index.js +++ b/index.js @@ -3,3 +3,11 @@ exports = module.exports = require('./lib/redis'); exports.ReplyError = require('./lib/reply_error'); exports.Promise = require('bluebird'); exports.Cluster = require('./lib/cluster'); + +exports.print = function (err, reply) { + if (err) { + console.log("Error: " + err); + } else { + console.log("Reply: " + reply); + } +}; From 64bc0d1a0b1e45d3631388360fba65e04d2c023e Mon Sep 17 00:00:00 2001 From: Frank Murphy Date: Thu, 11 Jun 2015 10:18:42 -0500 Subject: [PATCH 2/2] Change indent for print function to 2 spaces. --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 42d73b52..fb7f2c8a 100644 --- a/index.js +++ b/index.js @@ -5,9 +5,9 @@ exports.Promise = require('bluebird'); exports.Cluster = require('./lib/cluster'); exports.print = function (err, reply) { - if (err) { - console.log("Error: " + err); - } else { - console.log("Reply: " + reply); - } + if (err) { + console.log("Error: " + err); + } else { + console.log("Reply: " + reply); + } };