Deep-merges configuration layers, EARLIEST first — later layers win per key.
Merge rules (per key):
plain object vs plain object → recursive deep merge;
anything else (arrays, strings, numbers, booleans, null) → the later value REPLACES;
null is a real JSON value and replaces like any primitive;
undefined values in a later layer are skipped (they cannot exist in parsed JSON anyway);
__proto__, constructor and prototype keys are skipped at every depth (the runtime-override
layer is client-supplied JSON, so it must not reach Object.prototype).
null/undefined LAYERS are skipped entirely. The inputs are never mutated; the result is a
fresh object graph. Delegates to SafeDeepMerge in @memberjunction/global.
Deep-merges configuration layers, EARLIEST first — later layers win per key.
Merge rules (per key):
null) → the later value REPLACES;nullis a real JSON value and replaces like any primitive;undefinedvalues in a later layer are skipped (they cannot exist in parsed JSON anyway);__proto__,constructorandprototypekeys are skipped at every depth (the runtime-override layer is client-supplied JSON, so it must not reachObject.prototype).null/undefinedLAYERS are skipped entirely. The inputs are never mutated; the result is a fresh object graph. Delegates toSafeDeepMergein@memberjunction/global.