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

Function delValidValue

src/store/index.ts:946–959  ·  view source on GitHub ↗
(valueId: Id, skipMiddleware?: boolean)

Source from the content-addressed store, hash-verified

944 };
945
946 const delValidValue = (valueId: Id, skipMiddleware?: boolean): void => {
947 const defaultValue = mapGet(valuesDefaulted, valueId);
948 if (!isUndefined(defaultValue)) {
949 return setValidValue(valueId, defaultValue);
950 }
951 if (
952 skipMiddleware ||
953 (whileMutating(() => middleware[12]?.(valueId)) ?? true)
954 ) {
955 valueChanged(valueId, mapGet(valuesMap, valueId));
956 valueIdsChanged(valueId, -1);
957 mapSet(valuesMap, valueId);
958 }
959 };
960
961 const tableIdsChanged = (
962 tableId: Id,

Callers 2

setValidValuesFunction · 0.70
delValueFunction · 0.70

Calls 7

mapGetFunction · 0.90
isUndefinedFunction · 0.90
mapSetFunction · 0.90
setValidValueFunction · 0.70
whileMutatingFunction · 0.70
valueChangedFunction · 0.70
valueIdsChangedFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…