Shallow merges objects and concatenates the array.

Syntax

TypeScript
import { shallowMergeAll } from '@opentf/std';
shallowMergeAll(obj1, ...objN);
Info

Immutable: This does not mutate the given arrays or objects.

Warning

Sources are copied without Object.assign, so an own __proto__ key cannot replace the result's prototype.

Examples

TypeScript
const a = [1];
const b = [2];
const c = [3];
shallowMergeAll(a, b, c); //=> [1, 2, 3]
Last updated on
Edit this page