• Merge multiple objects recursively into the target object object.

    For arrays the elements of the source array are merged into the target array, elements on the same index are merged. If the source array is longer than the target array the extra elements are appended to the target array. If the source array is shorter than the target array the extra elements in the target array are not deleted. *

    Parameters

    • object: any

      target into which sources are merged

    • Rest ...sources: any[]

      source from which to merge

    Returns any

    The target object with the sources merged into it