Socket
Socket
Sign inDemoInstall

redis-clustr

Package Overview
Dependencies
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis-clustr - npm Package Compare versions

Comparing version 1.4.3 to 1.5.0

8

package.json
{
"name": "redis-clustr",
"version": "1.4.3",
"version": "1.5.0",
"description": "Redis cluster client",

@@ -28,8 +28,6 @@ "main": "src/RedisClustr.js",

"dependencies": {
"cluster-key-slot": "^1.0.5",
"double-ended-queue": "^2.1.0-0",
"redis": "~2.5.0"
"redis": "^2.6.0"
},
"optionalDependencies": {
"hiredis": "^0.4.0"
},
"devDependencies": {

@@ -36,0 +34,0 @@ "js-beautify": "^1.5.10",

'use strict';
var setupCommands = require('./setupCommands');
var crc = require('./crc16-xmodem');
var calculateSlot = require('cluster-key-slot');
var redis = require('redis');

@@ -278,17 +278,3 @@ var RedisBatch = require('./RedisBatch');

// support for hash tags to keep keys on the same slot
// http://redis.io/topics/cluster-spec#keys-hash-tags
var openKey = key.indexOf('{');
if (openKey !== -1) {
var tmpKey = key.substring(openKey + 1);
var closeKey = tmpKey.indexOf('}');
// } in key and it's not {}
if (closeKey > 0) {
key = tmpKey.substring(0, closeKey);
}
}
var slot = crc(key) % 16384;
var slot = calculateSlot(key);
var clients = self.slots[slot];

@@ -295,0 +281,0 @@

Sorry, the diff of this file is not supported yet

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