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

Function valueChanged

src/mergeable-store/index.ts:380–404  ·  view source on GitHub ↗
(
    valueId: Id,
    newValue: ValueOrUndefined,
    mutating: 0 | 1,
    defaulted: 0 | 1,
  )

Source from the content-addressed store, hash-verified

378 };
379
380 const valueChanged = (
381 valueId: Id,
382 newValue: ValueOrUndefined,
383 mutating: 0 | 1,
384 defaulted: 0 | 1,
385 ) => {
386 setAdd(touchedValues, valueId);
387 if (listeningToRawStoreChanges || mutating) {
388 if (mutating) {
389 mutated = 1;
390 }
391 mergeContentOrChanges([
392 [{}],
393 [
394 {
395 [valueId]: [
396 newValue,
397 defaultingContent || defaulted ? EMPTY_STRING : getNextHlc(),
398 ],
399 },
400 ],
401 1,
402 ]);
403 }
404 };
405
406 const getMergeableContentImpl = (encoded = false): MergeableContent => [
407 stampMapToObjWithHash(contentStampMap[0], (tableStampMap) =>

Callers

nothing calls this directly

Calls 3

setAddFunction · 0.90
mergeContentOrChangesFunction · 0.70
getNextHlcFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…