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

Function mapSet

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:169–169  ·  view source on GitHub ↗
(map2, key, value)

Source from the content-addressed store, hash-verified

167var mapForEach = (map2, cb) => collForEach(map2, (value, key) => cb(key, value));
168var mapMap = (coll, cb) => arrayMap([...coll?.entries() ?? []], ([key, value]) => cb(value, key));
169var mapSet = (map2, key, value) => isUndefined(value) ? (collDel(map2, key), map2) : map2?.set(key, value);
170var mapEnsure = (map2, key, getDefaultValue, hadExistingValue) => {
171 if (!collHas(map2, key)) {
172 mapSet(map2, key, getDefaultValue());

Callers 15

mapEnsureFunction · 0.70
visitTreeFunction · 0.70
setThingFunction · 0.70
delStoreListenersFunction · 0.70
setDefinitionFunction · 0.70
processRowFunction · 0.70
processTableFunction · 0.70
delDefinitionFunction · 0.70
addListenerFunction · 0.70
delListenerFunction · 0.70
clearCheckpointIdFunction · 0.70
addCheckpointImplFunction · 0.70

Calls 2

isUndefinedFunction · 0.70
collDelFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…