web-storage-manager
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -33,3 +33,3 @@ require("core-js/modules/es7.symbol.async-iterator"); | ||
} catch (error) { | ||
return false; | ||
throw error; | ||
} | ||
@@ -48,8 +48,6 @@ }; | ||
const encoded = this.encode(value); | ||
console.log('encoded: ', encoded); | ||
storage.setItem(key, encoded); | ||
return true; | ||
} catch (error) { | ||
console.log('encoded error: ', error); | ||
throw new Error('Unable to encode and save data'); | ||
throw error; | ||
} | ||
@@ -75,3 +73,3 @@ }; | ||
} catch (error) { | ||
return false; | ||
throw error; | ||
} | ||
@@ -98,4 +96,3 @@ }; | ||
} catch (error) { | ||
console.log('encoded error: ', error); | ||
return false; | ||
throw error; | ||
} | ||
@@ -117,3 +114,3 @@ }; | ||
} catch (error) { | ||
return false; | ||
throw error; | ||
} | ||
@@ -135,4 +132,3 @@ }; | ||
} catch (error) { | ||
console.log('encoded error: ', error); | ||
return false; | ||
throw error; | ||
} | ||
@@ -263,3 +259,3 @@ }; | ||
} catch (error) { | ||
return false; | ||
throw error; | ||
} | ||
@@ -358,4 +354,3 @@ }; | ||
} catch (error) { | ||
console.log('encoded error: ', error); | ||
return false; | ||
throw error; | ||
} | ||
@@ -375,3 +370,3 @@ }; | ||
} catch (error) { | ||
return null; | ||
throw error; | ||
} | ||
@@ -392,4 +387,3 @@ }; | ||
} catch (error) { | ||
console.log('encoded error: ', error); | ||
return null; | ||
throw error; | ||
} | ||
@@ -419,4 +413,3 @@ }; | ||
} catch (error) { | ||
console.log('encoded error: ', error); | ||
return null; | ||
throw error; | ||
} | ||
@@ -446,4 +439,3 @@ }; | ||
} catch (error) { | ||
console.log('encoded error: ', error); | ||
return null; | ||
throw error; | ||
} | ||
@@ -463,3 +455,3 @@ }; | ||
} catch (error) { | ||
return false; | ||
throw error; | ||
} | ||
@@ -482,3 +474,3 @@ }; | ||
} catch (error) { | ||
return false; | ||
throw error; | ||
} | ||
@@ -498,3 +490,3 @@ }; | ||
} catch (error) { | ||
return false; | ||
throw error; | ||
} | ||
@@ -511,3 +503,4 @@ }; | ||
const rawStr = JSON.stringify(obj); | ||
const encObj = window.btoa(rawStr); | ||
const encObj = window.btoa(rawStr); // console.log('encoded: ', encObj) | ||
return encObj; | ||
@@ -524,4 +517,5 @@ }; | ||
const decoded = window.atob(encObj); | ||
const obj = JSON.parse(decoded); | ||
const obj = JSON.parse(decoded); // console.log('decoded: ', encObj) | ||
return obj; | ||
}; |
{ | ||
"name": "web-storage-manager", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "Web utility storage manager to handle save, update and data purge", | ||
@@ -5,0 +5,0 @@ "main": "lib/web-storage-manager.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17017
407