It deeply merges objects and concatenates the arrays if any present.
Syntax
TypeScript
import { mergeAll } from '@opentf/std'; mergeAll(obj1, ...objN);
Info
Immutable: This does not mutate the given arrays or objects.
Info
Both string-keyed and symbol-keyed object properties participate in the deep merge. Arrays at matching keys are concatenated.
Examples
TypeScript
const a = { a: { b: [1] } }; const b = { a: { b: [2] } }; mergeAll(a, b); //=> { a: { b: [1, 2] }