MCPcopy Index your code
hub / github.com/tinyplex/tinybase / getValueChange

Function getValueChange

src/store/index.ts:1118–1127  ·  view source on GitHub ↗
(valueId: Id)

Source from the content-addressed store, hash-verified

1116 ) as CellChange;
1117
1118 const getValueChange: GetValueChange = (valueId: Id) =>
1119 ifNotUndefined(
1120 mapGet(changedValues, valueId),
1121 ([oldValue, newValue]) => [
1122 true,
1123 decodeIfJson(oldValue),
1124 decodeIfJson(newValue),
1125 ],
1126 () => [false, ...pairNew(getValue(valueId))] as ValueChange,
1127 ) as ValueChange;
1128
1129 const callInvalidCellListeners = (mutator: 0 | 1) =>
1130 !collIsEmpty(invalidCells) && !collIsEmpty(invalidCellListeners[mutator])

Callers 6

ListenersFunction · 0.50
ListenersFunction · 0.50
ListenersFunction · 0.50
store.tsFile · 0.50
mergeable-store.tsFile · 0.50

Calls 4

mapGetFunction · 0.90
decodeIfJsonFunction · 0.90
pairNewFunction · 0.90
getValueFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…