How to use the localforage/src/localforage.setItem function in localforage

To help you get started, we’ve selected a few localforage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kalkih / mini-graph-card / src / main.js View on Github external
async setCache(key, data, compressed) {
    return compressed
      ? localForage.setItem(key, compress(data))
      : localForage.setItem(`${key}-raw`, data);
  }
github kalkih / mini-graph-card / src / main.js View on Github external
async setCache(key, data, compressed) {
    return compressed
      ? localForage.setItem(key, compress(data))
      : localForage.setItem(`${key}-raw`, data);
  }
github padloc / padloc / packages / app / src / storage.ts View on Github external
async save(s: Storable) {
        await localStorage.setItem(`${s.kind}_${s.id}`, s.toRaw());
    }
github padloc / padloc / packages / app / src / lib / storage.ts View on Github external
async save(s: Storable) {
        await localStorage.setItem(`${s.kind}_${s.id}`, s.toRaw());
    }