A wrapper for IndexedDB that provides a simpler, queryable API for client-side database operations.
db.js is a JavaScript wrapper library for IndexedDB that simplifies client-side database operations. It provides a promise-based, queryable API to interact with IndexedDB, making it easier to store, retrieve, and manage structured data directly in the browser. The library abstracts the verbose native API into a more developer-friendly interface while maintaining compatibility with IndexedDB's core features.
Frontend developers building web applications that require offline data storage, complex client-side data management, or progressive web apps (PWAs) with persistent local databases.
Developers choose db.js because it drastically reduces the boilerplate and complexity of working directly with IndexedDB. Its fluent query builder, promise-based async handling, and support for atomic updates offer a modern, intuitive alternative to the low-level IndexedDB API, speeding up development for data-intensive web apps.
db.js is a wrapper for IndexedDB to make it easier to work against
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
All operations return ES6 Promises, enabling clean, chainable async code without callback hell, as shown in examples like server.people.add().then().
Offers an intuitive syntax for filtering, ranges, limits, and mapping, making complex queries straightforward, such as server.people.query().filter('firstName', 'Aaron').execute().
Simplifies database setup by allowing definition of stores and indexes during initialization, reducing boilerplate compared to native IndexedDB.
Supports batch modifications within queries using the modify method, enabling efficient updates to multiple records atomically, as demonstrated in the README.
Requires explicit version increments for schema changes and complex error recovery for blocked connections, adding development overhead and potential for mistakes.
Has a smaller ecosystem compared to alternatives like Dexie, with fewer tutorials, plugins, or signals of active maintenance, which can slow troubleshooting.
For simple key-value storage, the schema and promise setup might be unnecessarily complex, making it overkill compared to localStorage or simpler libraries.