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

redis-json

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis-json - npm Package Compare versions

Comparing version 6.0.2 to 6.0.3

10

es/jsonCache.js

@@ -56,3 +56,3 @@ import { promisify } from 'util';

const numKey = Number(key);
return isNaN(numKey) ? decodeKey(key) : numKey;
return isNaN(numKey) || isHex(key) ? decodeKey(key) : numKey;
}

@@ -90,2 +90,10 @@ /**

})();
/**
* Checks the key is hex string or not.
*
* @param key
*/
function isHex(key) {
return key ? Boolean(key.match(/^0x[0-9a-f]+$/i)) : false;
}

@@ -92,0 +100,0 @@ var TYPE;

@@ -58,3 +58,3 @@ 'use strict';

const numKey = Number(key);
return isNaN(numKey) ? decodeKey(key) : numKey;
return isNaN(numKey) || isHex(key) ? decodeKey(key) : numKey;
}

@@ -92,2 +92,10 @@ /**

})();
/**
* Checks the key is hex string or not.
*
* @param key
*/
function isHex(key) {
return key ? Boolean(key.match(/^0x[0-9a-f]+$/i)) : false;
}

@@ -94,0 +102,0 @@ var TYPE;

2

package.json
{
"name": "redis-json",
"version": "6.0.2",
"version": "6.0.3",
"description": "A wrapper library to store JSON Objects in redis-hashsets and retrieve it back as JSON objects",

@@ -5,0 +5,0 @@ "sideEffects": false,

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