How to use the idb.delete function in idb

To help you get started, we’ve selected a few idb 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 manusa / isotope-mail / client / src / services / indexed-db.js View on Github external
async function _openDatabaseSafe() {
  let db = await _openDatabase();
  if (!db.objectStoreNames.contains(STATE_STORE)) {
    // Corrupted DB, recreate
    db.close();
    await idb.delete(DATABASE_NAME);
    db = await _openDatabase();
  }
  return db;
}
github wtulloch / Blazor.IndexedDB / Blazor.IndexedDB.JS / src / indexedDbBlazor.ts View on Github external
public deleteDb = async(dbName: string): Promise => {
        this.dbInstance.close();

        await idb.delete(dbName);

        return `The database ${dbName} has been deleted`;
}
github Reshiru / Blazor.IndexedDB.Framework / src / Blazor.IndexedDB.Framework / nugets / Blazor.IndexedDB.JS / src / indexedDbBlazor.ts View on Github external
public deleteDb = async(dbName: string): Promise => {
        this.dbInstance.close();

        await idb.delete(dbName);

        return `The database ${dbName} has been deleted`;
}

idb

A small wrapper that makes IndexedDB usable

ISC
Latest version published 6 months ago

Package Health Score

83 / 100
Full package analysis