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.
23 lines (14 loc) • 1.14 kB
Markdown
## 🛡️ Safer Custom Types
This patch release brings security and consistency improvements to the custom JSON type system of TinyLocalStorage! 🔐✨
### 🔧 What's Changed
* **🧊 `freezeType` flag added to `registerJsonType()`**
You can now freeze custom types to prevent them from being accidentally overwritten or removed.
* **❌ Secure deletion control**
`deleteJsonType()` now throws an error if you try to delete a frozen type. No more silent mistakes! 🛑
* **🕵️♀️ New helper: `hasJsonType()`**
Quickly check if a type is already registered.
* **🔒 `getString()` now safely serializes values**
Improved internal handling ensures safer string output for objects, special types, and edge cases — preventing unexpected runtime issues or unsafe output formatting.
### ⚠️ Security Notes
These changes prevent accidental or malicious tampering with critical type behavior by allowing type freezing and validation before registration. Perfect for safely extending JSON logic in shared environments!
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.19.1...1.19.2