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

sessions

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sessions - npm Package Compare versions

Comparing version 0.0.2-2 to 0.0.2-3

lib/store/mysql.js

2

examples/simple.js

@@ -19,3 +19,3 @@ /**

var sessions = require("../lib/sessions"),
Sessions = new sessions(sessions.stores.memory, { expires: 5 }),
Sessions = new sessions(null, { expires: 5 }),
intervalId = null;

@@ -22,0 +22,0 @@

@@ -7,7 +7,7 @@ var util = require("util"),

function Sessions(store, opts) {
function Sessions(store, opts, storeOpts) {
events.EventEmitter.call(this);
this.store = (typeof store != "undefined" && store !== null ? new store() : new module.exports.stores.memory());
this.opts = opts || {};
this.store = (typeof store != "undefined" && store !== null ? new store(storeOpts || {}) : new module.exports.stores.memory(storeOpts || {}));
this._currentSessions = 0;

@@ -167,3 +167,5 @@

}
} catch (e) { }
} catch (e) {
throw e;
}
}

@@ -252,2 +254,12 @@

},
remove: function () {
var args = [ uid ].concat(Array.prototype.slice.apply(arguments));
if (typeof args[args.length - 1] != "function") {
args.push(function () {});
}
store.remove.apply(store, args);
return this;
},
refresh: function (expire) {

@@ -254,0 +266,0 @@ meta.expires = Date.now() + ((expire || expires) * 1000);

@@ -108,3 +108,3 @@ function MemoryStore() {

for (k in items) {
delete this.store[uid][items[k]];
delete this.store[uid].data[items[k]];
}

@@ -111,0 +111,0 @@ }

{
"name" : "sessions",
"version" : "0.0.2-2",
"version" : "0.0.2-3",
"description" : "NodeJS session management",

@@ -5,0 +5,0 @@ "keywords" : [ "session", "cookie" ],

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