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.

23 lines (15 loc) 1.08 kB
### ✨ New Features * Added a complete collection of **typed attribute helpers**: * `setAttrBigInt` / `attrBigInt` * `setAttrDate` / `attrDate` * `setAttrJson` / `attrJson` * `setAttrNumber` / `attrNumber` * `setAttrBoolean` / `attrBoolean` * `setAttrString` / `attrString` These methods give you **type-safe control** over attributes, making your code cleaner and easier to maintain. ### 🔄 Changes * The original `setAttr` method has been **relaxed**: it now accepts **any value** (not only strings or numbers). * If you still want the old strict behavior (string-only values), you should now use **`setAttrString`** explicitly. ### 🛠️ Why this change? This update makes `setAttr` more flexible while still giving developers who prefer strict type checks an explicit option (`setAttrString`). You can now store and retrieve attributes in multiple formats — numbers, booleans, dates, JSON objects, and even BigInts — without boilerplate conversions. **Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.22.4...1.22.5