Skip to main content
Module

x/automerge/index.ts>load

A JSON-like data structure (a CRDT) that can be modified concurrently by different users, and merged again automatically.
Go to Latest
function load
import { load } from "https://deno.land/x/automerge@2.2.0/index.ts";

Load an automerge document from a compressed document produce by save

Parameters

data: Uint8Array
  • The compressed document
optional
_opts: ActorId | InitOptions<T>
  • Either an actor ID or some InitOptions, if the actor ID is null a random actor ID will be created

Note that load will throw an error if passed incomplete content (for example if you are receiving content over the network and don't know if you have the complete document yet). If you need to handle incomplete content use init followed by loadIncremental.