MCPcopy
hub / github.com/di-sukharev/opencommit / mergeObjectSync

Method mergeObjectSync

out/cli.cjs:29431–29448  ·  view source on GitHub ↗
(status, pairs)

Source from the content-addressed store, hash-verified

29429 return _ParseStatus.mergeObjectSync(status, syncPairs);
29430 }
29431 static mergeObjectSync(status, pairs) {
29432 const finalObject = {};
29433 for (const pair of pairs) {
29434 const { key, value } = pair;
29435 if (key.status === "aborted")
29436 return exports2.INVALID;
29437 if (value.status === "aborted")
29438 return exports2.INVALID;
29439 if (key.status === "dirty")
29440 status.dirty();
29441 if (value.status === "dirty")
29442 status.dirty();
29443 if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) {
29444 finalObject[key.value] = value.value;
29445 }
29446 }
29447 return { status: status.value, value: finalObject };
29448 }
29449 };
29450 exports2.ParseStatus = ParseStatus;
29451 exports2.INVALID = Object.freeze({

Callers 3

mergeObjectAsyncMethod · 0.80
_parseMethod · 0.80
_parseMethod · 0.80

Calls 1

dirtyMethod · 0.80

Tested by

no test coverage detected