UNPKG

kura

Version:

The FileSystem API abstraction library.

26 lines 905 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IdbLocalFileSystem = void 0; const AbstractLocalFileSystem_1 = require("../AbstractLocalFileSystem"); const IdbAccessor_1 = require("./IdbAccessor"); class IdbLocalFileSystem extends AbstractLocalFileSystem_1.AbstractLocalFileSystem { constructor(dbName, options) { super(options); this.dbName = dbName; } createAccessor() { return new Promise((resolve, reject) => { const accessor = new IdbAccessor_1.IdbAccessor(this.dbName, this.options); accessor .open(this.dbName) .then(() => { resolve(accessor); }) .catch((err) => { reject(err); }); }); } } exports.IdbLocalFileSystem = IdbLocalFileSystem; //# sourceMappingURL=IdbLocalFileSystem.js.map