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

Function processRow

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:279–293  ·  view source on GitHub ↗
(rowId)

Source from the content-addressed store, hash-verified

277 const rowValues = mapGet(allRowValues, id2);
278 const sortKeys = mapGet(allSortKeys, id2);
279 const processRow = (rowId) => {
280 const getCell = (cellId) => store.getCell(tableId, rowId, cellId);
281 const oldRowValue = mapGet(rowValues, rowId);
282 const newRowValue = hasRow(tableId, rowId) ? validateRowValue(getRowValue(getCell, rowId)) : void 0;
283 if (!(oldRowValue === newRowValue || isArray(oldRowValue) && isArray(newRowValue) && arrayIsEqual(oldRowValue, newRowValue))) {
284 mapSet(changedRowValues, rowId, [oldRowValue, newRowValue]);
285 }
286 if (!isUndefined(getSortKey)) {
287 const oldSortKey = mapGet(sortKeys, rowId);
288 const newSortKey = hasRow(tableId, rowId) ? getSortKey(getCell, rowId) : void 0;
289 if (oldSortKey != newSortKey) {
290 mapSet(changedSortKeys, rowId, newSortKey);
291 }
292 }
293 };
294 const processTable = (force) => {
295 onChanged(
296 () => {

Callers 1

setDefinitionAndListenFunction · 0.70

Calls 6

mapGetFunction · 0.70
hasRowFunction · 0.70
isArrayFunction · 0.70
arrayIsEqualFunction · 0.70
mapSetFunction · 0.70
isUndefinedFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…