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

Function validateRow

src/store/index.ts:409–427  ·  view source on GitHub ↗
(
    tableId: Id,
    rowId: Id | undefined,
    row: Row,
    skipDefaults?: 1,
  )

Source from the content-addressed store, hash-verified

407 );
408
409 const validateRow = (
410 tableId: Id,
411 rowId: Id | undefined,
412 row: Row,
413 skipDefaults?: 1,
414 ): boolean =>
415 objValidate(
416 skipDefaults ? row : addDefaultsToRow(row, tableId, rowId),
417 (cell: Cell, cellId: Id): boolean =>
418 ifNotUndefined(
419 getValidatedCell(tableId, rowId, cellId, cell),
420 (validCell) => {
421 row[cellId] = validCell;
422 return true;
423 },
424 () => false,
425 ) as boolean,
426 () => cellInvalid(tableId, rowId),
427 );
428
429 const getValidatedCell = (
430 tableId: Id,

Callers 4

validateTableFunction · 0.70
setRowFunction · 0.70
addRowFunction · 0.70
setPartialRowFunction · 0.70

Calls 4

objValidateFunction · 0.90
addDefaultsToRowFunction · 0.70
getValidatedCellFunction · 0.70
cellInvalidFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…