UNPKG

tiny-essentials

Version:

Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.

15 lines (10 loc) 651 B
### 🌟 Added * **Versioned LocalStorage support** in `TinyLocalStorage` 🎉 Now supports schema migration logic using a version number and `onUpgrade` callback, inspired by IndexedDB and SQL-style upgrades. ### ⚙️ Changes * Added `updateStorageVersion(version, onUpgrade)` method: * Triggers upgrade callback when a new version is set. * Throws on version downgrade to prevent accidental data loss. * Internally tracks version using the same `LSDB::`-based key naming strategy. * Adds protection against overwriting reserved `LSDB::` keys. **Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.19.2...1.19.3