New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cocreate/local-storage

Package Overview
Dependencies
Maintainers
1
Versions
205
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cocreate/local-storage - npm Package Compare versions

Comparing version 1.14.2 to 1.14.3

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [1.14.3](https://github.com/CoCreate-app/CoCreate-local-storage/compare/v1.14.2...v1.14.3) (2024-04-26)
### Bug Fixes
* error handling of QuotaExceededError ([58ee966](https://github.com/CoCreate-app/CoCreate-local-storage/commit/58ee966f8b933a4950c0d88a54a8f737eaf3ffac))
## [1.14.2](https://github.com/CoCreate-app/CoCreate-local-storage/compare/v1.14.1...v1.14.2) (2024-02-14)

@@ -2,0 +9,0 @@

2

package.json
{
"name": "@cocreate/local-storage",
"version": "1.14.2",
"version": "1.14.3",
"description": "A Simple component similar to CoCreate-input & CoCreate-fetch which Save and fetch data for inputs, textarea, selects from localstorage. Easily configured using HTML5 attributes and/or JavaScript API",

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

@@ -85,7 +85,15 @@ import observer from '@cocreate/observer';

setItem: function (key, value) {
// Set the value of the item.
if (this.support)
window.localStorage.setItem(key, value);
else
this.storage.set(key, value)
try {
if (this.support)
window.localStorage.setItem(key, value);
else
this.storage.set(key, value);
} catch (error) {
if (error instanceof DOMException && (error.code === 22 || error.code === 1014 || error.name === 'QuotaExceededError' || error.name === 'NS_ERROR_DOM_QUOTA_REACHED')) {
// TODO: create a fallback method, perhaps setting in indexeddb if above a specific size
console.log('Local storage limit exceeded. Falling back to IndexedDB.');
} else {
console.error('Error setting item:', error);
}
}
},

@@ -92,0 +100,0 @@

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