Skip to main content
Module

x/earthstar/mod.browser.ts>ReplicaDriverIndexedDB

A specification and Javascript library for building online tools you can truly call your own.
Go to Latest
class ReplicaDriverIndexedDB
import { ReplicaDriverIndexedDB } from "https://deno.land/x/earthstar@v9.3.3/mod.browser.ts";

A replica driver which persists to IndexedDB in the browser. Maximum storage capacity varies, but is generally upwards of one gigabyte. Works in browsers.

Constructors

new
ReplicaDriverIndexedDB(share: ShareAddress)

Properties

_db: IDBDatabase | null

Methods

close(erase: boolean): Promise<void>
deleteConfig(key: string): Promise<boolean>
getConfig(key: string): Promise<string | undefined>
getIndexedDb(): Promise<IDBDatabase>
listConfigKeys(): Promise<string[]>
setConfig(key: string, value: string): Promise<void>
upsert(doc: Doc): Promise<Doc>