var glimpse = require('glimpse');
var store = require('store.js');

var _storeSummaryKey = 'glimpse.data.summary',
    _storeDetailKey = 'glimpse.data.request';
// store Found Summary
(function() {
    function storeFoundSummary(data) {
      store.set(_storeSummaryKey, data);
    }

    glimpse.on('data.request.summary.found.remote', storeFoundSummary);
    glimpse.on('data.request.summary.found.stream', storeFoundSummary);
})();

// store Found Detail
(function() {
    function storeFoundDetail(data) {
      var key = _storeDetailKey + '.' + data.id;
      store.set(key, data);
    }

    glimpse.on('data.request.detail.found.remote', storeFoundDetail);
})();

module.exports = {
    triggerGetLastestSummaries: function() {
        var data = store.get(_storeSummaryKey);
        if(data && data.length > 0)
          glimpse.emit('data.request.summary.found.local', data);
    },
    triggerGetDetailsFor: function(requestId) {
        var data = store.get(_storeDetailKey + '.' + requestId);
        if(data && data.length > 0)
          glimpse.emit('data.request.detail.found.local', data);
    }
};

@@ -183,32 +183,143 @@
 y%0A(function() %7B%0A
+    //TODO: Need to complete%0A    //Push into local storage%0A    //address error handling, flushing out old data%0A
     function sto
@@ -337,24 +337,24 @@
 ary(data) %7B%0A
-
       store.
@@ -572,24 +572,135 @@
 unction() %7B%0A
+    //TODO: Need to complete%0A    //Push into local storage%0A    //address error handling, flushing out old data%0A
     function
@@ -946,24 +946,118 @@
 unction() %7B%0A
+      //TODO: Need to complete%0A      //Pull from local storage%0A      //address error handling%0A
         var 
@@ -1201,16 +1201,16 @@
 %0A    %7D,%0A
-
     trig
@@ -1245,24 +1245,118 @@
 equestId) %7B%0A
+      //TODO: Need to complete%0A      //Pull from local storage%0A      //address error handling%0A
         var 

Add todo comments for local storage request repository