Class VersionVector
Constructors
constructor
-
Returns VersionVector
Methods
bump
-
records a change to
tagsand returns the new cursor; no tags is no changeParameters
- tags: readonly string[]
Returns number
diff
snapshot
-
the vector as JSON
Returns VectorSnapshot
version
-
the cursor at which
taglast changed, or 0 when it never hasParameters
- tag: string
Returns number
Staticfrom
-
rebuilds a vector from VersionVector.snapshot
Parameters
- snapshot: VectorSnapshot
Returns VersionVector
Tag to counter, with one cursor that only moves forward. A bump moves the cursor once and stamps every tag in it with the new value, so a tag's version is the cursor at its last change and
diff(from)is every tag stamped afterfrom.