@hazae41/glacier
Version:
Yet another React data (re)fetching library
19 lines (16 loc) • 481 B
JavaScript
;
class AwaitingQueryStorage {
storage;
constructor(storage) {
this.storage = storage;
storage.catch(console.error);
}
async getOrThrow(cacheKey) {
return await this.storage.then(x => x.getOrThrow(cacheKey));
}
async setOrThrow(cacheKey, value) {
return await this.storage.then(x => x.setOrThrow(cacheKey, value));
}
}
exports.AwaitingQueryStorage = AwaitingQueryStorage;
//# sourceMappingURL=index.cjs.map