Comparing version 0.0.2 to 0.0.3
@@ -108,11 +108,3 @@ var _ = require('lodash'); | ||
if (_this.replyEncoding) { | ||
if (value instanceof Buffer) { | ||
value = value.toString(_this.replyEncoding); | ||
} else if (Array.isArray(value)) { | ||
for (var i = 0; i < value.length; ++i) { | ||
if (value[i] instanceof Buffer) { | ||
value[i] = value[i].toString(_this.replyEncoding); | ||
} | ||
} | ||
} | ||
value = convertBufferToString(value, _this.replyEncoding); | ||
} | ||
@@ -143,1 +135,21 @@ var transformer = Command.transformer.reply[_this.name]; | ||
module.exports = Command; | ||
function convertBufferToString(value, encoding) { | ||
if (value instanceof Buffer) { | ||
return value.toString(encoding); | ||
} | ||
if (Array.isArray(value)) { | ||
var res = []; | ||
for (var i = 0; i < value.length; ++i) { | ||
if (value[i] instanceof Buffer) { | ||
value[i] = value[i].toString(encoding); | ||
} else if (Array.isArray(value[i])) { | ||
res[i] = convertBufferToString(value[i], encoding); | ||
} else { | ||
res[i] = value[i]; | ||
} | ||
} | ||
return res; | ||
} | ||
return value; | ||
} |
@@ -56,3 +56,5 @@ var Queue = require('fastqueue'); | ||
// in both case we just emit a silent error. | ||
return self.silentEmit('error', err); | ||
self.flushQueue(new Error("Ready check failed: " + err.message)); | ||
self.silentEmit('error', err); | ||
return; | ||
} | ||
@@ -59,0 +61,0 @@ self.serverInfo = info; |
@@ -101,3 +101,7 @@ var _ = require('lodash'); | ||
associatedCommand.resolve(reply); | ||
try { | ||
associatedCommand.resolve(reply); | ||
} catch (err) { | ||
associatedCommand.reject(err); | ||
} | ||
@@ -104,0 +108,0 @@ if (replyType) { |
{ | ||
"name": "ioredis", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "A delightful, performance-focused Redis client for Node and io.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
646649
43
2240
1