new CopayPeer class. Peers working!
This commit is contained in:
parent
9ca83e35fc
commit
fab2c8a505
7 changed files with 357 additions and 241 deletions
|
|
@ -7,12 +7,20 @@ function Storage() {
|
|||
}
|
||||
|
||||
Storage.prototype.get = function(k) {
|
||||
return this.data[k];
|
||||
return JSON.parse(localStorage.getItem(k));
|
||||
};
|
||||
|
||||
Storage.prototype.set = function(k,v) {
|
||||
this.data[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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue