Returns a copy of the collection with the remaining collections merged in.
merge<C>(collection: C,
...collections: Array<Iterable<unknown> | Iterable<[unknown, unknown]> | {[key: string]: unknown}>): C
A functional alternative to collection.merge()
which will also work with
plain Objects and Arrays.
const { merge } = require('immutable')
const original = { x: 123, y: 456 }
merge(original, { y: 789, z: 'abc' }) // { x: 123, y: 789, z: 'abc' }
console.log(original) // { x: 123, y: 456 }run it