Modern IndexedDB wrapper with Promises, AsyncIterables and strict typing.
IndexedDB API was available in browsers 3 years before Promises. Current event-based API is verbose and not as convenient to use in modern codebases as async/await
.
IDBRequest<T>
has.then()
method (except forIDBRequest<IDBCursor | IDBCursorWithValue>
).IDBTransaction<T>
hasthen()
method..openCursor()
and.openKeyCursor()
implementSymbol.asyncIterator
.openDatabase()
has a generic to specify DB schema.Validate
type to validate your DB schema.- Automatic versioning and DB migrations with
migrations
argument ofopenDatabase()
.