New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ioredis-mock

Package Overview
Dependencies
Maintainers
1
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ioredis-mock - npm Package Compare versions

Comparing version 5.2.0 to 5.2.1

5

lib/commands/defineCommand.js

@@ -129,3 +129,6 @@ "use strict";

}) {
this[command] = (0, _command.default)(customCommand(numberOfKeys, luaCode).bind(this), command, this);
const cmd = (0, _command.default)(customCommand(numberOfKeys, luaCode).bind(this), command, this);
this[command] = cmd; // for multi/pipeline
this.customCommands[command] = cmd;
}

3

lib/index.js

@@ -54,3 +54,4 @@ "use strict";

this.connected = false;
this.subscriberMode = false; // eslint-disable-next-line prefer-object-spread
this.subscriberMode = false;
this.customCommands = {}; // eslint-disable-next-line prefer-object-spread

@@ -57,0 +58,0 @@ const optionsWithDefault = Object.assign({}, defaultOptions, options);

@@ -27,8 +27,18 @@ "use strict";

this._transactions = 0;
Object.keys(commands).forEach(command => {
this[command] = this._createCommand(command);
this.copyCommands();
}
copyCommands() {
Object.keys(commands).forEach(commandName => {
const command = commands[commandName];
this[commandName] = this._createCommand(commandName, command);
}); // make sure we support custom commands, too
Object.keys(this.redis.customCommands).forEach(commandName => {
const command = this.redis.customCommands[commandName];
this[commandName] = this._createCommand(commandName, command);
});
}
_createCommand(commandName) {
_createCommand(commandName, command) {
return (...args) => {

@@ -45,3 +55,3 @@ const lastArgIndex = args.length - 1;

const commandEmulator = commands[commandName].bind(this.redis);
const commandEmulator = command.bind(this.redis);
const commandArgs = (0, _command.processArguments)(args, commandName, this.redis);

@@ -48,0 +58,0 @@

@@ -55,3 +55,3 @@ {

"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^6.15.0",
"eslint-config-prettier": "^7.0.0",
"eslint-plugin-import": "^2.22.1",

@@ -129,3 +129,3 @@ "eslint-plugin-jest": "^24.1.3",

"runkitExampleFilename": "example.js",
"version": "5.2.0"
"version": "5.2.1"
}
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