Socket
Socket
Sign inDemoInstall

@global-savings-group/extension-storage

Package Overview
Dependencies
0
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.1 to 0.2.2

15

dist/storage/chrome.storage.js
export class ChromeStorage {
areaName;
constructor(areaName) {
this.areaName = areaName;
this.onChanged = (key, callback) => {
chrome.storage.onChanged.addListener((changes, areaName) => {
if (areaName === this.areaName && changes[key]) {
callback(changes[key].newValue, changes[key].oldValue);
}
});
};
}

@@ -37,2 +31,9 @@ async get(name) {

}
onChanged = (key, callback) => {
chrome.storage.onChanged.addListener((changes, areaName) => {
if (areaName === this.areaName && changes[key]) {
callback(changes[key].newValue, changes[key].oldValue);
}
});
};
getStorage() {

@@ -39,0 +40,0 @@ return chrome.storage[this.areaName];

export class MemoryStorage {
data = {};
constructor(data = {}) {
this.data = {};
this.data = data;

@@ -5,0 +5,0 @@ }

{
"name": "@global-savings-group/extension-storage",
"version": "0.2.1",
"version": "0.2.2",
"description": "Cross-browser storage service for browser extensions",

@@ -5,0 +5,0 @@ "author": "Global Savings Group",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc