From a6c533673fd5e8924a54a9c576e9e41d939b3574 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Wed, 10 Dec 2014 12:03:00 -0300 Subject: [PATCH] added clear method to encrypted storage classes --- js/plugins/EncryptedInsightStorage.js | 4 ++++ js/plugins/EncryptedLocalStorage.js | 3 +++ 2 files changed, 7 insertions(+) diff --git a/js/plugins/EncryptedInsightStorage.js b/js/plugins/EncryptedInsightStorage.js index d6fd4f0f7..0148216c7 100644 --- a/js/plugins/EncryptedInsightStorage.js +++ b/js/plugins/EncryptedInsightStorage.js @@ -49,4 +49,8 @@ EncryptedInsightStorage.prototype.removeItem = function(name, callback) { InsightStorage.prototype.removeItem.apply(this, [name, callback]); }; +EncryptedInsightStorage.prototype.clear = function(callback) { + InsightStorage.prototype.clear.apply(this, [callback]); +}; + module.exports = EncryptedInsightStorage; diff --git a/js/plugins/EncryptedLocalStorage.js b/js/plugins/EncryptedLocalStorage.js index 591308f17..d75e9d5e7 100644 --- a/js/plugins/EncryptedLocalStorage.js +++ b/js/plugins/EncryptedLocalStorage.js @@ -52,6 +52,9 @@ EncryptedLocalStorage.prototype.removeItem = function(name, callback) { LocalStorage.prototype.removeItem.apply(this, [name, callback]); }; +EncryptedLocalStorage.prototype.clear = function(callback) { + LocalStorage.prototype.clear.apply(this, [callback]); +}; module.exports = EncryptedLocalStorage;