sessionstore
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -6,3 +6,4 @@ 'use strict'; | ||
_ = require('lodash'), | ||
memjs = require('memjs'); | ||
memjs = require('memjs'), | ||
jsonSerializer = require('json-serialize'); | ||
@@ -90,3 +91,3 @@ var MemcachedSessionStore = function (options) { | ||
try { | ||
result = JSON.parse(value); | ||
result = jsonSerializer.deserialize(value); | ||
} catch (error) { | ||
@@ -93,0 +94,0 @@ if (callback) callback(error); |
@@ -7,3 +7,4 @@ 'use strict'; | ||
async = require('async'), | ||
redis = require('redis'); | ||
redis = require('redis'), | ||
jsonSerializer = require('json-serialize'); | ||
@@ -138,3 +139,3 @@ var RedisSessionStore = function (options) { | ||
try { | ||
result = JSON.parse(data.toString()); | ||
result = jsonSerializer.deserialize(data.toString()); | ||
} catch (error) { | ||
@@ -171,3 +172,3 @@ if (callback) callback(err); | ||
try { | ||
result = JSON.parse(data.toString()); | ||
result = jsonSerializer.deserialize(data.toString()); | ||
} catch (error) { | ||
@@ -174,0 +175,0 @@ if (callback) callback(err); |
@@ -42,2 +42,7 @@ 'use strict'; | ||
createSessionStore: function(options, callback) { | ||
if (typeof options === 'function') { | ||
callback = options; | ||
options = {}; | ||
} | ||
options = options || {}; | ||
@@ -44,0 +49,0 @@ |
{ | ||
"author": "adrai", | ||
"name": "sessionstore", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"private": false, | ||
@@ -15,2 +15,3 @@ "main": "index.js", | ||
"async": "0.9.0", | ||
"json-serialize": "1.1.2", | ||
"lodash": "2.4.1", | ||
@@ -32,6 +33,8 @@ "tolerance": "1.0.0" | ||
"keywords": [ | ||
"express", | ||
"session", | ||
"connect", | ||
"orm", | ||
"mongodb", | ||
"couchdb", | ||
"nstore", | ||
"tingodb", | ||
@@ -38,0 +41,0 @@ "redis", |
@@ -121,3 +121,3 @@ # Introduction | ||
var ss = module.exports.createSessionStore({ type: 'mongodb' }, function(err, ss) { | ||
var ss = sessionstore.createSessionStore({ type: 'mongodb' }, function(err, ss) { | ||
console.log('hello from callback'); | ||
@@ -124,0 +124,0 @@ // use store here... |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44653
775
4
+ Addedjson-serialize@1.1.2
+ Addedjson-serialize@1.1.2(transitive)