| am_get_history | R Documentation |
Returns the full change history of the document as a list of change metadata.
This provides a simpler interface than am_get_changes() for examining
document history without needing to work with serialized changes directly.
am_get_history(doc)
doc |
An Automerge document |
Note: A future implementation will add detailed change introspection functions to extract metadata like commit messages, timestamps, actor IDs, etc.
A list of raw vectors (serialized changes), one for each change in the document's history, in chronological order.
doc <- am_create()
am_put(doc, AM_ROOT, "x", 1)
am_commit(doc, "Initial")
am_put(doc, AM_ROOT, "x", 2)
am_commit(doc, "Update")
history <- am_get_history(doc)
cat("Document history contains", length(history), "change(s)\n")
am_close(doc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.