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

Function stampUpdate

src/common/stamps.ts:49–58  ·  view source on GitHub ↗
(
  stamp: Stamp<unknown, true>,
  hlc: Hlc,
  hash: Hash,
)

Source from the content-addressed store, hash-verified

47 EMPTY_STRING;
48
49export const stampUpdate = (
50 stamp: Stamp<unknown, true>,
51 hlc: Hlc,
52 hash: Hash,
53) => {
54 if (hlc > stamp[1]) {
55 stamp[1] = hlc;
56 }
57 stamp[2] = hash >>> 0;
58};
59
60export const stampNewObj = <Thing>(hlc = EMPTY_STRING): Stamp<IdObj<Thing>> =>
61 stampNew(objNew<Thing>(), hlc);

Callers 4

mergeContentOrChangesFunction · 0.90
mergeCellsOrValuesFunction · 0.90
getPersistedFunction · 0.90
getPersistedFunction · 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…