fix(core): update

This commit is contained in:
2020-09-18 10:12:02 +00:00
parent 068199b5e9
commit 6bd3bd4f37
6 changed files with 1206 additions and 1020 deletions

View File

@ -1 +1 @@
export * from './webstiore.classes.webstore';
export * from './webstore.classes.webstore';

View File

@ -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);
}
}
}

View File

@ -1,5 +1,3 @@
import * as idb from 'idb';
export {
idb
}
export { idb };