/* automatically generated by JSCoverage - do not edit */
if (typeof _$jscoverage === 'undefined') _$jscoverage = {};
if (! _$jscoverage['middleware/session/memory.js']) {
  _$jscoverage['middleware/session/memory.js'] = [];
  _$jscoverage['middleware/session/memory.js'][13] = 0;
  _$jscoverage['middleware/session/memory.js'][21] = 0;
  _$jscoverage['middleware/session/memory.js'][22] = 0;
  _$jscoverage['middleware/session/memory.js'][29] = 0;
  _$jscoverage['middleware/session/memory.js'][39] = 0;
  _$jscoverage['middleware/session/memory.js'][40] = 0;
  _$jscoverage['middleware/session/memory.js'][41] = 0;
  _$jscoverage['middleware/session/memory.js'][42] = 0;
  _$jscoverage['middleware/session/memory.js'][44] = 0;
  _$jscoverage['middleware/session/memory.js'][45] = 0;
  _$jscoverage['middleware/session/memory.js'][46] = 0;
  _$jscoverage['middleware/session/memory.js'][49] = 0;
  _$jscoverage['middleware/session/memory.js'][50] = 0;
  _$jscoverage['middleware/session/memory.js'][52] = 0;
  _$jscoverage['middleware/session/memory.js'][55] = 0;
  _$jscoverage['middleware/session/memory.js'][69] = 0;
  _$jscoverage['middleware/session/memory.js'][70] = 0;
  _$jscoverage['middleware/session/memory.js'][71] = 0;
  _$jscoverage['middleware/session/memory.js'][72] = 0;
  _$jscoverage['middleware/session/memory.js'][73] = 0;
  _$jscoverage['middleware/session/memory.js'][84] = 0;
  _$jscoverage['middleware/session/memory.js'][85] = 0;
  _$jscoverage['middleware/session/memory.js'][86] = 0;
  _$jscoverage['middleware/session/memory.js'][87] = 0;
  _$jscoverage['middleware/session/memory.js'][88] = 0;
  _$jscoverage['middleware/session/memory.js'][99] = 0;
  _$jscoverage['middleware/session/memory.js'][100] = 0;
  _$jscoverage['middleware/session/memory.js'][102] = 0;
  _$jscoverage['middleware/session/memory.js'][103] = 0;
  _$jscoverage['middleware/session/memory.js'][105] = 0;
  _$jscoverage['middleware/session/memory.js'][115] = 0;
  _$jscoverage['middleware/session/memory.js'][116] = 0;
  _$jscoverage['middleware/session/memory.js'][117] = 0;
  _$jscoverage['middleware/session/memory.js'][127] = 0;
  _$jscoverage['middleware/session/memory.js'][128] = 0;
}
_$jscoverage['middleware/session/memory.js'][13]++;
var Store = require("./store");
_$jscoverage['middleware/session/memory.js'][21]++;
var MemoryStore = module.exports = (function MemoryStore() {
  _$jscoverage['middleware/session/memory.js'][22]++;
  this.sessions = {};
});
_$jscoverage['middleware/session/memory.js'][29]++;
MemoryStore.prototype.__proto__ = Store.prototype;
_$jscoverage['middleware/session/memory.js'][39]++;
MemoryStore.prototype.get = (function (sid, fn) {
  _$jscoverage['middleware/session/memory.js'][40]++;
  var self = this;
  _$jscoverage['middleware/session/memory.js'][41]++;
  process.nextTick((function () {
  _$jscoverage['middleware/session/memory.js'][42]++;
  var expires, sess = self.sessions[sid];
  _$jscoverage['middleware/session/memory.js'][44]++;
  if (sess) {
    _$jscoverage['middleware/session/memory.js'][45]++;
    sess = JSON.parse(sess);
    _$jscoverage['middleware/session/memory.js'][46]++;
    expires = "string" == typeof sess.cookie.expires? new Date(sess.cookie.expires): sess.cookie.expires;
    _$jscoverage['middleware/session/memory.js'][49]++;
    if (! expires || new Date() < expires) {
      _$jscoverage['middleware/session/memory.js'][50]++;
      fn(null, sess);
    }
    else {
      _$jscoverage['middleware/session/memory.js'][52]++;
      self.destroy(sid, fn);
    }
  }
  else {
    _$jscoverage['middleware/session/memory.js'][55]++;
    fn();
  }
}));
});
_$jscoverage['middleware/session/memory.js'][69]++;
MemoryStore.prototype.set = (function (sid, sess, fn) {
  _$jscoverage['middleware/session/memory.js'][70]++;
  var self = this;
  _$jscoverage['middleware/session/memory.js'][71]++;
  process.nextTick((function () {
  _$jscoverage['middleware/session/memory.js'][72]++;
  self.sessions[sid] = JSON.stringify(sess);
  _$jscoverage['middleware/session/memory.js'][73]++;
  fn && fn();
}));
});
_$jscoverage['middleware/session/memory.js'][84]++;
MemoryStore.prototype.destroy = (function (sid, fn) {
  _$jscoverage['middleware/session/memory.js'][85]++;
  var self = this;
  _$jscoverage['middleware/session/memory.js'][86]++;
  process.nextTick((function () {
  _$jscoverage['middleware/session/memory.js'][87]++;
  delete self.sessions[sid];
  _$jscoverage['middleware/session/memory.js'][88]++;
  fn && fn();
}));
});
_$jscoverage['middleware/session/memory.js'][99]++;
MemoryStore.prototype.all = (function (fn) {
  _$jscoverage['middleware/session/memory.js'][100]++;
  var arr = [], keys = Object.keys(this.sessions);
  _$jscoverage['middleware/session/memory.js'][102]++;
  for (var i = 0, len = keys.length; i < len; ++i) {
    _$jscoverage['middleware/session/memory.js'][103]++;
    arr.push(this.sessions[keys[i]]);
}
  _$jscoverage['middleware/session/memory.js'][105]++;
  fn(null, arr);
});
_$jscoverage['middleware/session/memory.js'][115]++;
MemoryStore.prototype.clear = (function (fn) {
  _$jscoverage['middleware/session/memory.js'][116]++;
  this.sessions = {};
  _$jscoverage['middleware/session/memory.js'][117]++;
  fn && fn();
});
_$jscoverage['middleware/session/memory.js'][127]++;
MemoryStore.prototype.length = (function (fn) {
  _$jscoverage['middleware/session/memory.js'][128]++;
  fn(null, Object.keys(this.sessions).length);
});
_$jscoverage['middleware/session/memory.js'].source = ["","/*!"," * Connect - session - MemoryStore"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var Store = require('./store');","","/**"," * Initialize a new `MemoryStore`."," *"," * @api public"," */","","var MemoryStore = module.exports = function MemoryStore() {","  this.sessions = {};","};","","/**"," * Inherit from `Store.prototype`."," */","","MemoryStore.prototype.__proto__ = Store.prototype;","","/**"," * Attempt to fetch session by the given `sid`."," *"," * @param {String} sid"," * @param {Function} fn"," * @api public"," */","","MemoryStore.prototype.get = function(sid, fn){","  var self = this;","  process.nextTick(function(){","    var expires","      , sess = self.sessions[sid];","    if (sess) {","      sess = JSON.parse(sess);","      expires = 'string' == typeof sess.cookie.expires","        ? new Date(sess.cookie.expires)","        : sess.cookie.expires;","      if (!expires || new Date &lt; expires) {","        fn(null, sess);","      } else {","        self.destroy(sid, fn);","      }","    } else {","      fn();","    }","  });","};","","/**"," * Commit the given `sess` object associated with the given `sid`."," *"," * @param {String} sid"," * @param {Session} sess"," * @param {Function} fn"," * @api public"," */","","MemoryStore.prototype.set = function(sid, sess, fn){","  var self = this;","  process.nextTick(function(){","    self.sessions[sid] = JSON.stringify(sess);","    fn &amp;&amp; fn();","  });","};","","/**"," * Destroy the session associated with the given `sid`."," *"," * @param {String} sid"," * @api public"," */","","MemoryStore.prototype.destroy = function(sid, fn){","  var self = this;","  process.nextTick(function(){","    delete self.sessions[sid];","    fn &amp;&amp; fn();","  });","};","","/**"," * Invoke the given callback `fn` with all active sessions."," *"," * @param {Function} fn"," * @api public"," */","","MemoryStore.prototype.all = function(fn){","  var arr = []","    , keys = Object.keys(this.sessions);","  for (var i = 0, len = keys.length; i &lt; len; ++i) {","    arr.push(this.sessions[keys[i]]);","  }","  fn(null, arr);","};","","/**"," * Clear all sessions."," *"," * @param {Function} fn"," * @api public"," */","","MemoryStore.prototype.clear = function(fn){","  this.sessions = {};","  fn &amp;&amp; fn();","};","","/**"," * Fetch number of sessions."," *"," * @param {Function} fn"," * @api public"," */","","MemoryStore.prototype.length = function(fn){","  fn(null, Object.keys(this.sessions).length);","};"];
