vapor-chamber API reference - v1.16.0
    Preparing search index...

    Function indexedDbOutbox

    • indexedDbOutbox — zero-dependency IndexedDB adapter. Stores the whole queue as one value under a fixed key, so reads and writes are single-transaction and atomic. Prefer this over localStorageOutbox when queued payloads are large (localStorage has a ~5 MB origin quota and synchronous I/O).

      SSR-safe: the database is opened lazily on first use; when indexedDB is unavailable, load() resolves to null and save()/clear() warn and no-op.

      Parameters

      • dbName: string = 'vc-outbox'

        Database name. Default: 'vc-outbox'.

      • storeName: string = 'records'

        Object store name. Default: 'records'.

      Returns OutboxStorage

      const outbox = createOutbox({ storage: indexedDbOutbox() });
      await outbox.hydrate();