architecture refactor

This commit is contained in:
Manuel Araoz 2014-04-14 15:31:10 -03:00
commit 59c00da592
17 changed files with 151 additions and 47 deletions

View file

@ -1,26 +0,0 @@
'use strict';
var imports = require('soop').imports();
function Storage() {
this.data = {};
}
Storage.prototype.get = function(k) {
return JSON.parse(localStorage.getItem(k));
};
Storage.prototype.set = function(k,v) {
localStorage.setItem(k, JSON.stringify(v));
};
Storage.prototype.remove = function(k) {
localStorage.removeItem(k);
};
Storage.prototype.clearAll = function() {
localStorage.clear();
};
module.exports = require('soop')(Storage);