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

hazelcast-store

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hazelcast-store - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

4

lib/hazelcast-store.js

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

const noop = function(){};
const oneDay = 86400;
const oneDay = 86400000;
let debug;

@@ -23,3 +23,3 @@

return store.ttl || (typeof maxAge === 'number'
? Math.floor(maxAge / 1000)
? Math.floor(maxAge)
: oneDay);

@@ -26,0 +26,0 @@ }

{
"name": "hazelcast-store",
"version": "0.0.4",
"version": "0.0.5",
"description": "Hazelcast implementation of expressjs session store",

@@ -23,3 +23,3 @@ "main": "index.js",

"express-session": "^1.9.1",
"hazelcast-client": "^0.4.0",
"hazelcast-client": "^0.4.1",
"mocha": "^3.0.2"

@@ -26,0 +26,0 @@ },

@@ -19,3 +19,3 @@ "use strict";

"secure": true,
"maxAge": 600000
"maxAge": 1000
},

@@ -128,2 +128,36 @@ "name": "sid"

});
describe("test a short TTL with cookie ", function () {
it("should still exist with 100 ms timeout and a maxage of 1 second", (done) => {
createStore({ttl: null }, () => {
assert(typeof store.client === "object");
assert.strictEqual(store.ttl, null);
store.set(id, testSession, (err) => {
assert.strictEqual(err, null);
setTimeout(() => {
store.get(id, (error, session) => {
assert.strictEqual(error, null);
assert.deepEqual(session, testSession); // shoudl still exist
done();
});
}, 100);
});
});
});
it("should not exist after a 2 second timeout and a maxage of 1 second", (done) => {
setTimeout(() => {
store.get(id, (error, session) => {
assert.strictEqual(error, null);
assert.strictEqual(session, null); // session should be gone after
done();
});
}, 2000);
});
});
});
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