@atproto/oauth-client-browser
Version:
ATPROTO OAuth client for the browser (relies on WebCrypto & Indexed DB)
38 lines • 1.06 kB
JavaScript
import { DBIndex } from './db-index.js';
import { promisify } from './util.js';
export class DBObjectStore {
constructor(idbObjStore) {
this.idbObjStore = idbObjStore;
}
get name() {
return this.idbObjStore.name;
}
index(name) {
return new DBIndex(this.idbObjStore.index(name));
}
get(key) {
return promisify(this.idbObjStore.get(key));
}
getKey(query) {
return promisify(this.idbObjStore.getKey(query));
}
getAll(query, count) {
return promisify(this.idbObjStore.getAll(query, count));
}
getAllKeys(query, count) {
return promisify(this.idbObjStore.getAllKeys(query, count));
}
add(value, key) {
return promisify(this.idbObjStore.add(value, key));
}
put(value, key) {
return promisify(this.idbObjStore.put(value, key));
}
delete(key) {
return promisify(this.idbObjStore.delete(key));
}
clear() {
return promisify(this.idbObjStore.clear());
}
}
//# sourceMappingURL=db-object-store.js.map