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

Function setValidTable

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:1296–1317  ·  view source on GitHub ↗
(tableId, table, forceDel)

Source from the content-addressed store, hash-verified

1294 objIsEqual
1295 );
1296 const setValidTable = (tableId, table, forceDel) => ifTransformed(
1297 table,
1298 () => forceDel ? table : ifNotUndefined(
1299 middleware[2],
1300 (willSetTable) => whileMutating(
1301 () => willSetTable(tableId, structuredClone(table))
1302 ),
1303 () => table
1304 ),
1305 (validTable) => mapMatch(
1306 mapEnsure(tablesMap, tableId, () => {
1307 tableIdsChanged(tableId, 1);
1308 mapSet(tablePoolFunctions, tableId, getPoolFunctions());
1309 mapSet(tableCellIds, tableId, mapNew());
1310 return mapNew();
1311 }),
1312 validTable,
1313 (tableMap, rowId, row) => setValidRow(tableId, tableMap, rowId, row),
1314 (tableMap, rowId) => delValidRow(tableId, tableMap, rowId)
1315 ),
1316 objIsEqual
1317 );
1318 const setValidRow = (tableId, tableMap, rowId, row, forceDel) => ifTransformed(
1319 row,
1320 () => forceDel ? row : ifNotUndefined(

Callers 3

setValidTablesFunction · 0.70
delValidTableFunction · 0.70
setTableFunction · 0.70

Calls 11

ifTransformedFunction · 0.70
whileMutatingFunction · 0.70
willSetTableFunction · 0.70
mapMatchFunction · 0.70
mapEnsureFunction · 0.70
tableIdsChangedFunction · 0.70
mapSetFunction · 0.70
getPoolFunctionsFunction · 0.70
mapNewFunction · 0.70
setValidRowFunction · 0.70
delValidRowFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…