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.13 to 1.0.14

33

lib/web-storage-manager.js

@@ -185,4 +185,6 @@ require("core-js/modules/es7.symbol.async-iterator");

const key = _ref2[1];
collection = mapData(key, collection);
collection = collection[key.trim()]; // map data get value from key path
if (!collection) return false; // terminate on key not found
if (idx === childKeys.length - 1) {

@@ -210,7 +212,2 @@ if (!Array.isArray(collection)) {

}
} // map data get value from key path
function mapData(key, collection) {
return collection[key];
} // map data and update collection

@@ -281,4 +278,6 @@

const key = _ref6[1];
collection = mapData(key, collection);
collection = collection[key.trim()]; // map data get value from key path
if (!collection) return false; // terminate on key not found
if (idx === childKeys.length - 1) {

@@ -306,7 +305,2 @@ if (!Array.isArray(collection)) {

}
} // map data get value from key path
function mapData(key, collection) {
return collection[key];
} // map data and update collection

@@ -470,2 +464,17 @@

*
* will check if there's saved data under this domain
* @param {string} key - key names of your saved data
*/
exports.hasData = key => {
try {
const data = storage.getItem(key);
return data;
} catch (error) {
throw error;
}
};
/**
*
* will purge all saved data under this domain

@@ -472,0 +481,0 @@ *

{
"name": "web-storage-manager",
"version": "1.0.13",
"version": "1.0.14",
"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