@idxdb/promised
Version:
@idxdb/promised wraps the IndexedDB API. It allows you to easily store and retrieve data in an indexed db database using async/await syntax, making it easier to integrate with your existing codebase.
14 lines (13 loc) • 399 B
JavaScript
import { KeyCursor } from '../component/key-cursor.js';
import { requestResolver } from '../shared/request-resolver.js';
export class ValueCursor extends KeyCursor {
get value() {
return this._cursor.value;
}
async delete() {
await requestResolver(this._cursor.delete());
}
async update(value) {
await requestResolver(this._cursor.update(value));
}
}