fix(core): update
This commit is contained in:
@ -1 +1 @@
|
||||
export * from './webstiore.classes.webstore';
|
||||
export * from './webstore.classes.webstore';
|
||||
|
@ -9,13 +9,12 @@ export class WebStore<T = any> {
|
||||
public db: plugins.idb.IDBPDatabase;
|
||||
public objectStore: plugins.idb.IDBPObjectStore;
|
||||
public options: IWebStoreOptions;
|
||||
|
||||
|
||||
constructor(optionsArg: IWebStoreOptions) {
|
||||
this.options = optionsArg;
|
||||
}
|
||||
|
||||
public async init () {
|
||||
public async init() {
|
||||
this.db = await plugins.idb.openDB(this.options.dbName, 1, {
|
||||
upgrade: (db) => {
|
||||
db.createObjectStore(this.options.storeName);
|
||||
@ -47,4 +46,4 @@ export class WebStore<T = any> {
|
||||
async keys() {
|
||||
return this.db.getAllKeys(this.options.storeName);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
import * as idb from 'idb';
|
||||
|
||||
export {
|
||||
idb
|
||||
}
|
||||
export { idb };
|
||||
|
Reference in New Issue
Block a user