ChemPal Documentation - v1.6.0
    Preparing search index...

    Function clearSearchHistory

    • Removes every search-history entry.

      Returns Promise<void>

      Resolves once the store is empty.

      await clearSearchHistory();
      
      export async function clearSearchHistory(): Promise<void> {
      try {
      const db = await getDB();
      await db.clear(IDB_STORE.SEARCH_HISTORY);
      } catch (error) {
      logger.error('Failed to clear search history from IndexedDB', { error });
      }
      }