Wallet/js/services/storage.js
Matias Alejo Garcia 9ca83e35fc fix peers, pubkey WIP
2014-04-08 00:54:38 -03:00

22 lines
467 B
JavaScript

'use strict';
angular.module('copay.storage')
.factory('Storage', function($rootScope) {
return {
get: function(key) {
return JSON.parse(localStorage.getItem(key));
},
set: function(key, data) {
localStorage.setItem(key, JSON.stringify(data));
},
remove: function(key) {
localStorage.removeItem(key);
},
clearAll: function() {
localStorage.clear();
}
};
});