Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

connect-redis

Package Overview
Dependencies
Maintainers
3
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-redis - npm Package Compare versions

Comparing version 3.4.0 to 3.4.1

5

History.md

@@ -0,1 +1,6 @@

# 3.4.1 / 2018-09-28
- Update debug dependency
- Do not require node_redis dependency
# 3.4.0 / 2018-09-28

@@ -2,0 +7,0 @@

34

lib/connect-redis.js

@@ -8,3 +8,2 @@ /*!

var debug = require('debug')('connect:redis');
var redis = require('redis');
var util = require('util');

@@ -80,9 +79,12 @@ var noop = function(){};

this.client = options.client;
} else {
var redis = require('redis');
if (options.socket) {
this.client = redis.createClient(options.socket, options);
}
else {
this.client = redis.createClient(options);
}
}
else if (options.socket) {
this.client = redis.createClient(options.socket, options);
}
else {
this.client = redis.createClient(options);
}

@@ -316,3 +318,21 @@ // logErrors

/**
* Fetch count of all sessions
*
* @param {Function} fn
* @api public
*/
RedisStore.prototype.length = function (fn) {
var store = this;
if (!fn) fn = noop;
allKeys(store, function (err, keys) {
if (err) return fn(err);
return fn(null, keys.length);
});
};
/**

@@ -319,0 +339,0 @@ * Fetch all sessions

{
"name": "connect-redis",
"description": "Redis session store for Connect",
"version": "3.4.0",
"version": "3.4.1",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -16,3 +16,3 @@ "contributors": [

"dependencies": {
"debug": "^4.0.1",
"debug": "^4.1.1",
"redis": "^2.8.0"

@@ -19,0 +19,0 @@ },

@@ -61,2 +61,6 @@ [![npm](https://img.shields.io/npm/v/connect-redis.svg)](https://npmjs.com/package/connect-redis) [![Dependencies](https://img.shields.io/david/tj/connect-redis.svg)](https://david-dm.org/tj/connect-redis) ![Downloads](https://img.shields.io/npm/dm/connect-redis.svg)

#### Testing / Development
You can use [redis-mock](https://github.com/yeahoffline/redis-mock) as the client instead of connecting to an actual redis server for automated testing and development purposes.
FAQ

@@ -63,0 +67,0 @@ ---

@@ -29,2 +29,5 @@ /* eslint-env es6 */

data = yield store.lengthAsync();
t.deepEqual(1, data, '#length() ok');
ok = yield store.destroyAsync('123');

@@ -31,0 +34,0 @@ t.equal(ok, 1, '#destroy() ok');

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