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

Function valueChanged

src/store/index.ts:1054–1067  ·  view source on GitHub ↗
(
    valueId: Id,
    oldValue?: ValueOrUndefined,
    newValue?: ValueOrUndefined,
  )

Source from the content-addressed store, hash-verified

1052 ): ChangedIdsMap => idsChanged(changedValueIds, valueId, addedOrRemoved);
1053
1054 const valueChanged = (
1055 valueId: Id,
1056 oldValue?: ValueOrUndefined,
1057 newValue?: ValueOrUndefined,
1058 ): void => {
1059 const defaulted =
1060 collHas(defaultedValues, valueId) && isUndefined(oldValue) ? 1 : 0;
1061 mapEnsure<Id, ChangedValue>(changedValues, valueId, () => [
1062 oldValue,
1063 0,
1064 ])[1] = newValue;
1065 internalListeners[4]?.(valueId, newValue, mutating, defaulted);
1066 collDel(defaultedValues, valueId);
1067 };
1068
1069 const cellInvalid = (
1070 tableId?: Id,

Callers 2

setValidValueFunction · 0.70
delValidValueFunction · 0.70

Calls 4

collHasFunction · 0.90
isUndefinedFunction · 0.90
mapEnsureFunction · 0.90
collDelFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…