Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

web-storage-manager

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-storage-manager - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

18

lib/web-storage-manager.js

@@ -487,3 +487,2 @@ require("core-js/modules/es7.symbol.async-iterator");

exports.encode = obj => {
if (!obj || typeof obj !== 'string') return null;
const rawStr = JSON.stringify(obj);

@@ -502,8 +501,13 @@ const encObj = window.btoa(rawStr);

exports.decode = encObj => {
if (!encObj) return null;
const decoded = window.atob(encObj);
if (!decoded) return null;
const obj = JSON.parse(decoded);
console.log('decoded: ', obj);
return obj;
if (!encObj || typeof encObj !== 'string') return null;
try {
const decoded = window.atob(encObj);
const obj = JSON.parse(decoded);
console.log('decoded: ', obj);
return obj;
} catch (error) {
console.log('decoded error: ', error);
return null;
}
};
{
"name": "web-storage-manager",
"version": "1.0.11",
"version": "1.0.12",
"description": "Web utility storage manager to handle save, update and data purge",

@@ -5,0 +5,0 @@ "main": "lib/web-storage-manager.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc