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

express-mongoose-store

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-mongoose-store - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

16

index.js

@@ -6,2 +6,3 @@ module.exports = function(session, mongoose){

, debug = require('debug')('mongoose-store')
, one_day = 1000 * 60 * 60 * 24
;

@@ -22,9 +23,6 @@

var Session = mongoose.model('Session', session_schema)
, one_day = 1000 * 60 * 60 * 24
;
function MongooseStore(options) {
options = options || {};
Store.call(this, options);
this.Session = mongoose.model(options.modelName || 'Session', session_schema);
this.ttl = options.ttl || one_day;

@@ -37,3 +35,3 @@ };

debug('GET %s', sid);
Session.findOne({ sid: sid })
this.Session.findOne({ sid: sid })
.exec(function(err, data){

@@ -93,3 +91,3 @@ if(err){

Session.findOneAndUpdate({ sid: sid }, s, { upsert: true })
this.Session.findOneAndUpdate({ sid: sid }, s, { upsert: true })
.exec(function(err, data){

@@ -120,3 +118,3 @@ if(err){

debug('DESTROY %s', sid);
Session.findOneAndRemove({ sid: sid })
this.Session.findOneAndRemove({ sid: sid })
.exec(function(err, data){

@@ -135,3 +133,3 @@ if(err){

debug('CLEARALL');
Session.remove({})
this.Session.remove({})
.exec(function(err, data){

@@ -151,3 +149,3 @@ if(err){

debug('KEEPALIVE Querying Mongoose for empty set.');
Session.find({ noexits: true }, function(err, data){
this.Session.find({ noexits: true }, function(err, data){
if(err){

@@ -154,0 +152,0 @@ debug('KEEPALIVE error, %s', err);

{
"name": "express-mongoose-store",
"version": "1.0.1",
"version": "1.0.2",
"description": "Session store for people who want to use MongoDB sessions, and already have a MongooseJS connection for their backend.",

@@ -5,0 +5,0 @@ "main": "./index.js",

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