Skip to main content
Module

x/earthstar/mod.browser.ts>ReplicaDriverLocalStorage

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

A replica driver which perists to LocalStorage, which stores a maximum of five megabytes per domain. If you're storing multiple shares, this limit will be divided among all their replicas. Works in browsers and Deno.

Constructors

new
ReplicaDriverLocalStorage(share: ShareAddress)

Properties

_localStorageKeyConfig: string
_localStorageKeyDocs: string

Methods

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