MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / collectExtraKeys

Function collectExtraKeys

out/cli.cjs:34407–34424  ·  view source on GitHub ↗
(obj, extrasKey)

Source from the content-addressed store, hash-verified

34405 }
34406 }
34407 function collectExtraKeys(obj, extrasKey) {
34408 return obj.transform((val) => {
34409 const extras = {};
34410 const { shape } = obj;
34411 for (const [key] of Object.entries(val)) {
34412 if (key in shape) {
34413 continue;
34414 }
34415 const v5 = val[key];
34416 if (typeof v5 === "undefined") {
34417 continue;
34418 }
34419 extras[key] = v5;
34420 delete val[key];
34421 }
34422 return { ...val, [extrasKey]: extras };
34423 });
34424 }
34425 }
34426});
34427

Callers

nothing calls this directly

Calls 2

transformMethod · 0.45
entriesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…