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

Function addDefaultsToValues

src/store/index.ts:524–539  ·  view source on GitHub ↗
(values: Values)

Source from the content-addressed store, hash-verified

522 };
523
524 const addDefaultsToValues = (values: Values): Values => {
525 if (hasValuesSchema) {
526 collForEach(valuesDefaulted, (value, valueId) => {
527 if (!objHas(values, valueId)) {
528 values[valueId] = value;
529 setAdd(defaultedValues, valueId);
530 }
531 });
532 collForEach(valuesNonDefaulted, (valueId) => {
533 if (!objHas(values, valueId)) {
534 valueInvalid(valueId);
535 }
536 });
537 }
538 return values;
539 };
540
541 const setValidTablesSchema = (tablesSchema: TablesSchema): TablesSchemaMap =>
542 mapMatch(

Callers 1

validateValuesFunction · 0.70

Calls 4

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…