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

Function getMergeableCellDiff

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:2856–2884  ·  view source on GitHub ↗
(otherTableRowCellHashes)

Source from the content-addressed store, hash-verified

2854 return cellHashes;
2855 };
2856 const getMergeableCellDiff = (otherTableRowCellHashes) => {
2857 const [[tableStampMaps, tablesHlc]] = contentStampMap;
2858 const tablesObj = {};
2859 objForEach(
2860 otherTableRowCellHashes,
2861 (otherRowCellHashes, tableId) => objForEach(
2862 otherRowCellHashes,
2863 (otherCellHashes, rowId) => ifNotUndefined(
2864 mapGet(tableStampMaps, tableId),
2865 ([rowStampMaps, tableHlc]) => ifNotUndefined(
2866 mapGet(rowStampMaps, rowId),
2867 ([cellStampMaps, rowHlc]) => mapForEach(
2868 cellStampMaps,
2869 (cellId, [cell, cellHlc, hash]) => hash !== otherCellHashes[cellId] ? objEnsure(
2870 objEnsure(
2871 tablesObj,
2872 tableId,
2873 () => stampNewObj(tableHlc)
2874 )[0],
2875 rowId,
2876 () => stampNewObj(rowHlc)
2877 )[0][cellId] = [cell, cellHlc] : 0
2878 )
2879 )
2880 )
2881 )
2882 );
2883 return stampNew(tablesObj, tablesHlc);
2884 };
2885 const getMergeableValueHashes = () => mapToObj(contentStampMap[1][0], getStampHash);
2886 const getMergeableValueDiff = (otherValueHashes) => {
2887 const [, [valueStampMaps, valuesHlc]] = contentStampMap;

Callers

nothing calls this directly

Calls 6

objForEachFunction · 0.70
mapGetFunction · 0.70
mapForEachFunction · 0.70
objEnsureFunction · 0.70
stampNewObjFunction · 0.70
stampNewFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…