Shallowly merges two objects into a new object.
The first object.
The second object.
A new object containing all keys from a and b.
a
b
const obj1 = { a: 1, b: 2 };const obj2 = { b: 3, c: 4 };const merged = merge(obj1, obj2);console.log(merged); // { a: 1, b: 3, c: 4 } Copy
const obj1 = { a: 1, b: 2 };const obj2 = { b: 3, c: 4 };const merged = merge(obj1, obj2);console.log(merged); // { a: 1, b: 3, c: 4 }
1.1.0
Shallowly merges two objects into a new object.