Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async setCache(key, data, compressed) {
return compressed
? localForage.setItem(key, compress(data))
: localForage.setItem(`${key}-raw`, data);
}
async setCache(key, data, compressed) {
return compressed
? localForage.setItem(key, compress(data))
: localForage.setItem(`${key}-raw`, data);
}
async save(s: Storable) {
await localStorage.setItem(`${s.kind}_${s.id}`, s.toRaw());
}
async save(s: Storable) {
await localStorage.setItem(`${s.kind}_${s.id}`, s.toRaw());
}