idb
Promise-based wrapper around the browser's IndexedDB API that mirrors its methods with small usability changes.
idb wraps the browser’s IndexedDB API and mirrors its methods, but every request returns a promise. A database object gets shortcuts such as get, put and getAll that open a transaction for a single call, transactions expose a done promise, and cursors and stores can be iterated with for await. openDB takes upgrade, blocked, blocking and terminated callbacks, and the package ships TypeScript types that can describe a database’s stores.
Worth knowing
A transaction closes once nothing is left to do after the microtask queue, so awaiting a fetch between the start and the end of a transaction makes the next write fail. The README also says the library targets modern browsers and does not support Internet Explorer. For key-value storage alone, the README points to idb-keyval.
Identity
- Status
- Active
- Maintainer
- Jake Archibald4
- Maintained by
- Individual
- First release
- 20153
Rendering and deploy
- Install with
- npm, ES module from jsDelivr, UMD script from jsDelivr2
Releases
Adoption
Sources
- 2026-11-16: links, Written in, License, GitHub stars
api.github.com/repos/jakearchibald/idb - 2026-11-16: links, Categories, Install with
github.com/jakearchibald/idb/blob/main/README.md - 2026-11-16: First release, Last release
registry.npmjs.org/idb - 2026-11-16: Maintainer, License model
raw.githubusercontent.com/jakearchibald/idb/main/LICENSE - 2026-11-16: Current major version
registry.npmjs.org/idb/latest - 2026-11-16: npm downloads a week
api.npmjs.org/downloads/range/2026-11-01:2026-11-07/idb - 2026-11-16: Contributors
api.github.com/repos/jakearchibald/idb/contributors?per_page=1 - 2026-11-16: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/idb