Wallet/plugins/googleDrive.js

42 lines
774 B
JavaScript
Raw Normal View History

2014-09-01 16:31:35 -03:00
'use strict';
function GoogleDrive() {
this.type = 'STORAGE';
};
GoogleDrive.prototype.init = function() {
2014-09-01 23:44:35 -03:00
console.log('[googleDrive.js.3] init GoogleDrive'); //TODO
2014-09-01 16:31:35 -03:00
};
2014-09-01 23:44:35 -03:00
GoogleDrive.prototype.getItem = function(k) {
return localStorage.getItem(k);
};
GoogleDrive.prototype.setItem = function(k,v) {
localStorage.setItem(k,v);
};
GoogleDrive.prototype.removeItem = function(k) {
localStorage.removeItem(k);
};
GoogleDrive.prototype.clear = function() {
localStorage.clear();
};
delete GoogleDrive.prototype.length;
Object.defineProperty(GoogleDrive.prototype, 'length', {
get: function() {
return localStorage.length;
}
});
GoogleDrive.prototype.key = function(k) {
var v = localStorage.key(k);
return v;
};
2014-09-01 16:31:35 -03:00
module.exports = GoogleDrive;