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

Function mapMatch

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:178–182  ·  view source on GitHub ↗
(map2, obj, set, del = mapSet)

Source from the content-addressed store, hash-verified

176 return mapGet(map2, key);
177};
178var mapMatch = (map2, obj, set, del = mapSet) => {
179 objMap(obj, (value, id2) => set(map2, id2, value));
180 mapForEach(map2, (id2) => objHas(obj, id2) ? 0 : del(map2, id2));
181 return map2;
182};
183var mapToObj = (map2, valueMapper, excludeMapValue, excludeObjValue) => {
184 const obj = {};
185 collForEach(map2, (mapValue, id2) => {

Callers 7

setValidTablesSchemaFunction · 0.70
setValidValuesSchemaFunction · 0.70
setValidTablesFunction · 0.70
setValidTableFunction · 0.70
setValidRowFunction · 0.70
applyRowDirectlyFunction · 0.70
setValidValuesFunction · 0.70

Calls 4

setFunction · 0.85
objMapFunction · 0.70
mapForEachFunction · 0.70
objHasFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…