web-storage-manager
Advanced tools
Comparing version 1.0.10 to 1.0.11
@@ -487,5 +487,6 @@ require("core-js/modules/es7.symbol.async-iterator"); | ||
exports.encode = obj => { | ||
if (!obj || typeof obj !== 'string') return null; | ||
const rawStr = JSON.stringify(obj); | ||
const encObj = window.btoa(rawStr); // console.log('encoded: ', encObj) | ||
const encObj = window.btoa(rawStr); | ||
console.log('encoded: ', encObj); | ||
return encObj; | ||
@@ -501,6 +502,8 @@ }; | ||
exports.decode = encObj => { | ||
if (!encObj) return null; | ||
const decoded = window.atob(encObj); | ||
const obj = JSON.parse(decoded); // console.log('decoded: ', encObj) | ||
if (!decoded) return null; | ||
const obj = JSON.parse(decoded); | ||
console.log('decoded: ', obj); | ||
return obj; | ||
}; |
{ | ||
"name": "web-storage-manager", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"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
17048
412
4