Vinyl
    Preparing search index...

    Function mergeDeep

    Recursively copies the values of all the enumerable own properties from one or two source objects to a new object. Arrays will be concatenated.

    One or more source objects from which to copy properties. A single source provided will return a deep clone. Incompatible objects, for example given a number and an array, will return a clone of the last argument.

    merge

    • Concatenates multiple arrays together where each element is deeply cloned.

      Type Parameters

      • T extends any[]

      Parameters

      Returns T

    • Deep clones the given object.

      Type Parameters

      • T

      Parameters

      Returns T

    • Deep merges the two objects. If common keys are both arrays, they will be concatenated, if common keys are both objects, they will be merged. Incompatible types, e.g. an object and an array will use the later source.

      Type Parameters

      • A
      • B

      Parameters

      Returns A & B

    • Deep merges the three objects. If common keys are both arrays, they will be concatenated, if common keys are both objects, they will be merged. Incompatible types, e.g. an object and an array will use the later source.

      Type Parameters

      • A
      • B
      • C

      Parameters

      Returns A & B & C

    • Deep merges the four objects. If common keys are both arrays, they will be concatenated, if common keys are both objects, they will be merged. Incompatible types, e.g. an object and an array will use the later source.

      Type Parameters

      • A
      • B
      • C
      • D

      Parameters

      Returns A & B & C & D

    • Deep merges the five objects. If common keys are both arrays, they will be concatenated, if common keys are both objects, they will be merged. Incompatible types, e.g. an object and an array will use the later source.

      Type Parameters

      • A
      • B
      • C
      • D
      • E

      Parameters

      Returns A & B & C & D & E

    • Deep merges the six objects. If common keys are both arrays, they will be concatenated, if common keys are both objects, they will be merged. Incompatible types, e.g. an object and an array will use the later source.

      Type Parameters

      • A
      • B
      • C
      • D
      • E
      • F

      Parameters

      Returns A & B & C & D & E & F

    • Deep merges all objects. If common keys are both arrays, they will be concatenated, if common keys are both objects, they will be merged. Incompatible types, e.g. an object and an array will use the later source.

      Parameters

      • sources: readonly any[]
      • Optionaloptions: Partial<MergeOptions>

      Returns any