[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [mergeMap](./js-utils.mergemap.md) ## mergeMap() function Merge the `source` map into the `target` map, replacing keys that already exist. Signature: ```typescript export declare function mergeMap(target: Map, source: Map | ReadonlyArray<[TKey, TVal]>): Map; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | target | Map<TKey, TVal> | | | source | Map<TKey, TVal> \| ReadonlyArray<\[TKey, TVal\]> | | Returns: Map<TKey, TVal>