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

Function mapMap

src/common/map.ts:34–38  ·  view source on GitHub ↗
(
  coll: Map<Key, Value> | undefined,
  cb: (value: Value, key: Key) => Return,
)

Source from the content-addressed store, hash-verified

32): void => collForEach(map, (value, key) => cb(key, value));
33
34export const mapMap = <Key, Value, Return>(
35 coll: Map<Key, Value> | undefined,
36 cb: (value: Value, key: Key) => Return,
37): Return[] =>
38 arrayMap([...(coll?.entries() ?? [])], ([key, value]) => cb(value, key));
39
40export const mapSet = <Key, Value>(
41 map: Map<Key, Value> | undefined,

Callers 4

getSortedRowIdsFunction · 0.90
saveTablesFunction · 0.90
loadTablesFunction · 0.90
destroyFunction · 0.90

Calls 1

arrayMapFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…