localforage-driver-memory
Version:
in-memory localforage driver that resets on page reload
23 lines • 664 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var localforage_driver_commons_1 = require("localforage-driver-commons");
function key(idx, callback) {
var _this = this;
var promise = this.ready().then(function () {
var result;
try {
result = _this._dbInfo.mStore.key(idx);
if (result === undefined) {
result = null;
}
}
catch (_a) {
result = null;
}
return result;
});
localforage_driver_commons_1.executeCallback(promise, callback);
return promise;
}
exports.key = key;
//# sourceMappingURL=key.js.map