Skip to content

Utils / Full Stack / merge

Function: merge()

ts
function merge<T>(
   root, 
   others, 
   matcher): readonly T[];

Given two lists of the same type, iterate the first list and replace items matched by the matcher func in the first place.

Type Parameters

Type Parameter

T

Parameters

ParameterType

root

readonly T[]

others

readonly T[]

matcher

(item) => any

Returns

readonly T[]

Version v1.33.1 - Built on 2026-03-28