var Storage = { set: function(category, key, value) { window.localStorage.setItem(category +'-'+ key, JSON.stringify(value)); }, get: function(category, key) { var val = window.localStorage.getItem(category +'-'+ key); return val === null ? {} : JSON.parse(val); } };