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

Function addDefaultsToValues

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:1199–1214  ·  view source on GitHub ↗
(values)

Source from the content-addressed store, hash-verified

1197 return row;
1198 };
1199 const addDefaultsToValues = (values) => {
1200 if (hasValuesSchema) {
1201 collForEach(valuesDefaulted, (value, valueId) => {
1202 if (!objHas(values, valueId)) {
1203 values[valueId] = value;
1204 setAdd(defaultedValues, valueId);
1205 }
1206 });
1207 collForEach(valuesNonDefaulted, (valueId) => {
1208 if (!objHas(values, valueId)) {
1209 valueInvalid(valueId);
1210 }
1211 });
1212 }
1213 return values;
1214 };
1215 const setValidTablesSchema = (tablesSchema) => mapMatch(
1216 tablesSchemaMap,
1217 tablesSchema,

Callers 1

validateValuesFunction · 0.70

Calls 4

collForEachFunction · 0.70
objHasFunction · 0.70
setAddFunction · 0.70
valueInvalidFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…