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

Function setValidValues

src/store/index.ts:819–842  ·  view source on GitHub ↗
(
    values: Values,
    forceDel?: boolean,
  )

Source from the content-addressed store, hash-verified

817 );
818
819 const setValidValues = (
820 values: Values,
821 forceDel?: boolean,
822 ): RowMap | undefined =>
823 ifTransformed(
824 values,
825 () =>
826 forceDel
827 ? values
828 : ifNotUndefined(
829 middleware[5],
830 (willSetValues) =>
831 whileMutating(() => willSetValues(structuredClone(values))),
832 () => values,
833 ),
834 (validValues) =>
835 mapMatch(
836 valuesMap,
837 validValues,
838 (_valuesMap, valueId, value) => setValidValue(valueId, value),
839 (_valuesMap, valueId) => delValidValue(valueId),
840 ),
841 objIsEqual,
842 );
843
844 const setValidValue = (
845 valueId: Id,

Callers 2

setValuesFunction · 0.70
delValuesFunction · 0.70

Calls 6

mapMatchFunction · 0.90
ifTransformedFunction · 0.70
whileMutatingFunction · 0.70
setValidValueFunction · 0.70
delValidValueFunction · 0.70
willSetValuesFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…