Socket
Socket
Sign inDemoInstall

async-redis

Package Overview
Dependencies
4
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.4 to 1.1.5

2

package.json
{
"private": false,
"version": "1.1.4",
"version": "1.1.5",
"name": "async-redis",

@@ -5,0 +5,0 @@ "keywords": [

@@ -14,4 +14,9 @@ /* eslint func-names: ["error", "as-needed"] */

// this is the set of commands to NOT promisify
const commandsToSkipSet = new Set(['multi']);
// this is the set of commands to promisify
const commandSet = new Set(commands.filter(c => !commandsToSkipSet.has(c)));
AsyncRedis.decorate = redisClient => objectDecorator(redisClient, (name, method) => {
if (commands.includes(name)) {
if (commandSet.has(name)) {
return (...args) => new Promise((resolve, reject) => {

@@ -18,0 +23,0 @@ args.push((error, ...results) => {

@@ -57,2 +57,10 @@ const { assert } = require('chai');

});
describe('test multi not a promise', function () {
it('should be not equal', async () => {
let notAPromise = redisClient.multi();
console.log(notAPromise);
assert.notEqual(Promise.resolve(notAPromise), notAPromise);
});
});
});
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc