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

@global-savings-group/extension-storage

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@global-savings-group/extension-storage - npm Package Compare versions

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc