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

@jmondi/browser-storage

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jmondi/browser-storage - npm Package Compare versions

Comparing version 1.6.2 to 1.6.3

19

esm/index.js

@@ -36,3 +36,4 @@ export class BrowserStorage {

}
catch { }
catch {
}
return false;

@@ -83,3 +84,8 @@ }

constructor(config = {}) {
super({ ...config, adapter: globalThis.localStorage });
let adapter = globalThis.localStorage;
if (!(adapter instanceof Storage)) {
adapter = new MemoryStorageAdapter();
console.log("[@jmondi/browser-storage] window.localStorage is unavailable, falling back to an in memory storage adapter");
}
super({ ...config, adapter });
}

@@ -89,3 +95,8 @@ }

constructor(config = {}) {
super({ ...config, adapter: globalThis.sessionStorage });
let adapter = globalThis.sessionStorage;
if (!(adapter instanceof Storage)) {
adapter = new MemoryStorageAdapter();
console.log("[@jmondi/browser-storage] window.sessionStorage is unavailable, falling back to an in memory storage adapter");
}
super({ ...config, adapter });
}

@@ -121,4 +132,4 @@ }

super();
console.log("MemoryStorageProvider is deprecated, use MemoryStorageAdapter instead");
console.log("[@jmondi/browser-storage] MemoryStorageProvider is deprecated, use MemoryStorageAdapter instead");
}
}

@@ -5,3 +5,3 @@ {

"name": "@jmondi/browser-storage",
"version": "1.6.2",
"version": "1.6.3",
"description": "Utilities for local and session browser storage.",

@@ -8,0 +8,0 @@ "keywords": [

@@ -39,3 +39,4 @@ "use strict";

}
catch { }
catch {
}
return false;

@@ -87,3 +88,8 @@ }

constructor(config = {}) {
super({ ...config, adapter: globalThis.localStorage });
let adapter = globalThis.localStorage;
if (!(adapter instanceof Storage)) {
adapter = new MemoryStorageAdapter();
console.log("[@jmondi/browser-storage] window.localStorage is unavailable, falling back to an in memory storage adapter");
}
super({ ...config, adapter });
}

@@ -94,3 +100,8 @@ }

constructor(config = {}) {
super({ ...config, adapter: globalThis.sessionStorage });
let adapter = globalThis.sessionStorage;
if (!(adapter instanceof Storage)) {
adapter = new MemoryStorageAdapter();
console.log("[@jmondi/browser-storage] window.sessionStorage is unavailable, falling back to an in memory storage adapter");
}
super({ ...config, adapter });
}

@@ -128,5 +139,5 @@ }

super();
console.log("MemoryStorageProvider is deprecated, use MemoryStorageAdapter instead");
console.log("[@jmondi/browser-storage] MemoryStorageProvider is deprecated, use MemoryStorageAdapter instead");
}
}
exports.MemoryStorageProvider = MemoryStorageProvider;
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