Shallow Merges objects or arrays.
Syntax
import { shallowMerge } from '@opentf/std';
shallowMerge(obj1, ...objN);
✅
Immutable: This does not mutate the given arrays or objects.
Examples
const a = { a: 1 };
const b = { b: 2 };
shallowMerge(a, b); //=> { a: 1, b: 2 }
const a = [1];
const b = [2];
const c = [3];
shallowMerge(a, b, c); //=> [3]