UNPKG

@hazae41/glacier

Version:

Yet another React data (re)fetching library

17 lines (15 loc) 446 B
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)); } } export { AwaitingQueryStorage }; //# sourceMappingURL=index.mjs.map