Socket
Socket
Sign inDemoInstall

ioredis

Package Overview
Dependencies
Maintainers
1
Versions
228
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ioredis - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

test.js

30

lib/command.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc