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

Function getRowCellFunction

src/common/definable.ts:221–228  ·  view source on GitHub ↗
(
  getRowCell: Id | ((getCell: GetCell, rowId: Id) => RowValue) | undefined,
  defaultCellValue?: RowValue,
)

Source from the content-addressed store, hash-verified

219};
220
221export const getRowCellFunction = <RowValue>(
222 getRowCell: Id | ((getCell: GetCell, rowId: Id) => RowValue) | undefined,
223 defaultCellValue?: RowValue,
224): ((getCell: GetCell, rowId: Id) => RowValue) =>
225 isString(getRowCell)
226 ? (getCell: GetCell): RowValue => getCell(getRowCell) as any as RowValue
227 : (getRowCell ??
228 ((): RowValue => defaultCellValue ?? (EMPTY_STRING as any as RowValue)));
229
230export const getCreateFunction = <
231 Thing extends

Callers 3

setMetricDefinitionFunction · 0.90
setIndexDefinitionFunction · 0.90

Calls 2

isStringFunction · 0.90
getCellFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…