MCPcopy Create free account
hub / github.com/clientdb/clientdb / pickAfterFromChanges

Function pickAfterFromChanges

core/utils/changes.ts:19–29  ·  view source on GitHub ↗
(changes: Changes<T>)

Source from the content-addressed store, hash-verified

17}
18
19export function pickAfterFromChanges<T>(changes: Changes<T>): Partial<T> {
20 const after: Partial<T> = {};
21
22 for (const key in changes) {
23 if (changes.hasOwnProperty(key)) {
24 after[key] = changes[key]![1];
25 }
26 }
27
28 return after;
29}
30
31export function computeChanges<T>(dataNow: T, input: Partial<T>): Changes<T> {
32 const changes: Changes<T> = {};

Callers 1

reapplyEntityChangeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected