nullsession
Advanced tools
Comparing version 0.1.0 to 0.1.1
### 0.1.0 | ||
- /dev/null equivalent for connect-session | ||
- /dev/null equivalent for connect-session | ||
### 0.1.1 | ||
- adding empty cookie object in get api |
@@ -26,4 +26,9 @@ 'use strict'; | ||
NullStore.prototype.get = function get(id, callback) { | ||
//return empty object | ||
callback(null, {}); | ||
var cookie = { | ||
path: '/', | ||
httpOnly: true, | ||
maxAge: null | ||
}; | ||
//return empty object with cookie object | ||
callback(null, {cookie: cookie}); | ||
}; | ||
@@ -39,4 +44,6 @@ | ||
NullStore.prototype.set = function set(id, session, callback) { | ||
//return empty object | ||
callback(null, {}); | ||
session = session || {}; | ||
//return empty session object | ||
callback(null, session); | ||
}; | ||
@@ -43,0 +50,0 @@ |
@@ -7,4 +7,5 @@ 'use strict'; | ||
module.exports = function (settings) { | ||
settings = settings || {}; | ||
settings.store = new NullStore(settings); | ||
return session(settings); | ||
}; |
{ | ||
"name": "nullsession", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "/dev/null equivalent for connect-session", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
11905
90