Releases: chessurisme/reign
Releases · chessurisme/reign
v1.2.3
Release v1.2.3
Features:
- Added
close
method to the Reign to explicitly close the IndexedDB connection.// Usage example const db = new Reign({ databaseName: 'MyDatabase', storeNames: ['Users', 'Products'], version: 1 }); await db.init(); // Perform database operations... // Close the database connection on application shutdown db.close();
Benefits:
- Ensures proper resource management by allowing the database connection to be explicitly closed when no longer needed.
- Helps prevent potential memory leaks and resource contention, especially during application shutdown.
Reign IDB v1.1.0 - Now npm Installable!
Introducing Easier Integration 🌉
I am excited to announce the release of Reign IDB version 1.1.0, which brings official npm package support! This update makes it dramatically easier for developers to integrate lightweight IndexedDB management library into your projects.
What's New? 🆕
📦 npm Installation
You can now install Reign IDB directly from npm with a simple command:
npm install reign-idb
🔌 Simple Import
Import the library effortlessly in your JavaScript projects:
import Reign from 'reign-idb';
Why npm Installation Matters 💡
Package management is a critical part of modern JavaScript development. By providing an npm package, I'm offering:
- Simplified Dependency Management: Easily track and update the library version
- Seamless Integration: Works with modern build tools and module systems
- Consistent Distribution: Ensures all developers get the same, tested package
- Improved Discoverability: Easy to find and use in the npm ecosystem
Quick Usage Reminder 🚀
Here's a quick example of how simple it is to use Reign IDB:
import Reign from 'reign-idb';
// Create a database instance
const db = new Reign({
databaseName: 'MyApp',
storeNames: ['Users', 'Products'],
version: 1
});
// Initialize and start using
await db.init();
await db.update('Users', { name: 'Reign', age: 30 });
Looking Forward 🔭
This release is just the beginning. I'm committed to:
- Continuous improvements
- Enhanced documentation
- Community-driven feature development
Get Involved 🤝
- Star our GitHub repository
- Submit issues and feature requests
- Contribute to the project's growth
Installation Details 📥
# npm
npm install reign-idb
# yarn
yarn add reign-idb
# pnpm
pnpm add reign-idb
Happy coding! 💻✨
Best regards,
👨🏼💻Chessurisme
v1.0.0
Reign just released v1.0.0 last January 23, 2025
Added
- Initial release of the Reign IndexedDB management library
- Core
Reign
class for simplified IndexedDB operations - Comprehensive method support for database interactions:
init()
: Initialize database connectionupdate()
: Add or update records in object storesread()
: Retrieve all records from an object storeget()
: Fetch a specific record by IDdelete()
: Remove a record by ID
Features
- Flexible database and object store configuration
- Support for multiple object stores in a single database
- Automatic object store creation during database initialization
- Promise-based asynchronous operations
- Built-in parameter verification
- Error handling for database interactions
Dependencies
- Utility modules:
verifyParameters
: Validate constructor inputcreateTransaction
: Manage database transactions
Design Principles
- Simplified IndexedDB API
- Clean and intuitive method signatures
- Consistent error handling
- Modular and reusable design
Limitations
- Requires modern browser support for IndexedDB
- Primarily designed for client-side web applications
- Basic CRUD operations (more advanced querying not included)