package brr

  1. Overview
  2. Docs
Browser programming toolkit for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

brr-0.0.8.tbz
sha512=49e7bfbad2ea6a0139354e4a33c59c8a113c4c1e20a4f629bc5cad24aa801e474b4af10ce35adbda5d23dd294d1de5efa5b10bb3030d03f4758459977250a0f6

doc/brr.ocaml_poke_ui/Brr_ocaml_poke_ui/Store/index.html

Module Brr_ocaml_poke_ui.StoreSource

Persistent storage.

Basic interface to abstract over Brr_io.Storage and Web extension storage.

Sourcetype t

The type for persistent storage.

Sourceval create : get:(Jstr.t -> Jstr.t option Fut.or_error) -> set:(Jstr.t -> Jstr.t -> unit Fut.or_error) -> t

store is a store with given get and set functions.

Sourceval page : ?key_prefix:Jstr.t -> Brr_io.Storage.t -> t

local_store is a store that uses Brr_io.Storage.local, with keys prefixed by key_prefix (defaults to "ocaml-repl-").

Sourceval webext : ?key_prefix:Jstr.t -> unit -> t

webext_store is a store using the Web extension storage. The "storage" premission must be added to the manifest.

Sourceval get : t -> Jstr.t -> Jstr.t option Fut.or_error

get s k is the value of key k in s (if any).

Sourceval set : t -> Jstr.t -> Jstr.t -> unit Fut.or_error

set s k v sets the value of k in s to v.

OCaml

Innovation. Community. Security.