MCPcopy
hub / github.com/tinyplex/tinybase / getLatestHlc

Function getLatestHlc

src/common/stamps.ts:41–47  ·  view source on GitHub ↗
(
  hlc1: Hlc | undefined,
  hlc2: Hlc | undefined,
)

Source from the content-addressed store, hash-verified

39 newHlc > oldHlc ? (oldHlc ? getHash(oldHlc) : 0) ^ getHash(newHlc) : 0;
40
41export const getLatestHlc = (
42 hlc1: Hlc | undefined,
43 hlc2: Hlc | undefined,
44): Hlc =>
45 /*! istanbul ignore next */
46 ((hlc1 ?? EMPTY_STRING) > (hlc2 ?? EMPTY_STRING) ? hlc1 : hlc2) ??
47 EMPTY_STRING;
48
49export const stampUpdate = (
50 stamp: Stamp<unknown, true>,

Callers 3

mergeContentOrChangesFunction · 0.90
mergeCellsOrValuesFunction · 0.90
mergeTablesStampsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…