node-session
Advanced tools
Comparing version 1.1.1-beta to 1.2.1-beta
@@ -443,3 +443,21 @@ /** | ||
/** | ||
* Migrates the current session to a new session id while maintaining all | ||
* session attributes. | ||
* | ||
* @param {boolean} destroy Whether to delete the old session or leave it to garbage collection. | ||
* @return {boolean} True if session migrated, false if error. | ||
*/ | ||
Store.prototype.migrate = function (destroy) { | ||
if (destroy) { | ||
this.__handler.destroy(this.getId()); | ||
} | ||
this.setExists(false); | ||
this.setId(); | ||
return true; | ||
}; | ||
module.exports = Store; |
{ | ||
"name": "node-session", | ||
"version": "1.1.1-beta", | ||
"version": "1.2.1-beta", | ||
"description": "Session management for NodeJS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
1261
45857
10