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

Function getValidatedValue

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:1165–1169  ·  view source on GitHub ↗
(valueId, value)

Source from the content-addressed store, hash-verified

1163 () => valueInvalid()
1164 );
1165 const getValidatedValue = (valueId, value) => hasValuesSchema ? ifNotUndefined(
1166 mapGet(valuesSchemaMap, valueId),
1167 (valueSchema) => isNull(value) ? valueSchema[ALLOW_NULL] ? value : valueInvalid(valueId, value, valueSchema[DEFAULT]) : getCellOrValueType(value) === valueSchema[TYPE] ? encodeIfJson(value) : isJsonType(valueSchema[TYPE]) && isEncodedJson(value) ? value : valueInvalid(valueId, value, valueSchema[DEFAULT]),
1168 () => valueInvalid(valueId, value)
1169 ) : isUndefined(getCellOrValueType(value)) ? valueInvalid(valueId, value) : encodeIfJson(value);
1170 const addDefaultsToRow = (row, tableId, rowId) => {
1171 ifNotUndefined(
1172 mapGet(tablesSchemaRowCache, tableId),

Callers 2

validateValuesFunction · 0.70
setValueFunction · 0.70

Calls 8

mapGetFunction · 0.70
isNullFunction · 0.70
valueInvalidFunction · 0.70
getCellOrValueTypeFunction · 0.70
encodeIfJsonFunction · 0.70
isJsonTypeFunction · 0.70
isEncodedJsonFunction · 0.70
isUndefinedFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…