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

Function getMergeableCellHashes

src/mergeable-store/index.ts:558–584  ·  view source on GitHub ↗
(
    otherTableRowHashes: RowHashes,
  )

Source from the content-addressed store, hash-verified

556 };
557
558 const getMergeableCellHashes = (
559 otherTableRowHashes: RowHashes,
560 ): CellHashes => {
561 const cellHashes: CellHashes = {};
562 objForEach(otherTableRowHashes, (otherRowHashes, tableId) =>
563 ifNotUndefined(mapGet(contentStampMap[0][0], tableId), ([rowStampMaps]) =>
564 objForEach(otherRowHashes, (otherRowHash, rowId) =>
565 ifNotUndefined(
566 mapGet(rowStampMaps, rowId),
567 ([cellStampMaps, , rowHash]) =>
568 rowHash !== otherRowHash
569 ? mapForEach(
570 cellStampMaps,
571 (cellId, [, , cellHash]) =>
572 (objEnsure(
573 objEnsure<CellHashes[Id]>(cellHashes, tableId, objNew),
574 rowId,
575 objNew,
576 )[cellId] = cellHash),
577 )
578 : 0,
579 ),
580 ),
581 ),
582 );
583 return cellHashes;
584 };
585
586 const getMergeableCellDiff = (
587 otherTableRowCellHashes: CellHashes,

Callers

nothing calls this directly

Calls 4

objForEachFunction · 0.90
mapGetFunction · 0.90
mapForEachFunction · 0.90
objEnsureFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…