MCPcopy Create free account
hub / github.com/tinyplex/tinybase / setValidCell

Function setValidCell

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:1359–1376  ·  view source on GitHub ↗
(tableId, rowId, rowMap, cellId, cell, skipMiddleware)

Source from the content-addressed store, hash-verified

1357 );
1358 };
1359 const setValidCell = (tableId, rowId, rowMap, cellId, cell, skipMiddleware) => ifTransformed(
1360 cell,
1361 () => ifNotUndefined(
1362 skipMiddleware ? void 0 : middleware[4],
1363 (willSetCell) => whileMutating(() => willSetCell(tableId, rowId, cellId, cell)),
1364 () => cell
1365 ),
1366 (cell2) => {
1367 if (!collHas(rowMap, cellId)) {
1368 cellIdsChanged(tableId, rowId, cellId, 1);
1369 }
1370 const oldCell = mapGet(rowMap, cellId);
1371 if (cell2 !== oldCell) {
1372 cellChanged(tableId, rowId, cellId, oldCell, cell2);
1373 mapSet(rowMap, cellId, cell2);
1374 }
1375 }
1376 );
1377 const setCellIntoNewRow = (tableId, tableMap, rowId, cellId, validCell, skipMiddleware) => ifNotUndefined(
1378 mapGet(tableMap, rowId),
1379 (rowMap) => setValidCell(tableId, rowId, rowMap, cellId, validCell, skipMiddleware),

Callers 4

setValidRowFunction · 0.70
applyRowDirectlyFunction · 0.70
setCellIntoNewRowFunction · 0.70
delValidCellFunction · 0.70

Calls 8

ifTransformedFunction · 0.70
whileMutatingFunction · 0.70
willSetCellFunction · 0.70
collHasFunction · 0.70
cellIdsChangedFunction · 0.70
mapGetFunction · 0.70
cellChangedFunction · 0.70
mapSetFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…