Takaro - v0.4.11
    Preparing search index...

    Function mergeWith

    • This method is like _.merge except that it accepts customizer which is invoked to produce the merged values of the destination and source properties. If customizer returns undefined merging is handled by the method instead. The customizer is invoked with six arguments: (objValue, srcValue, key, object, source, stack).

      Type Parameters

      • TObject
      • TSource

      Parameters

      • object: TObject

        The destination object.

      • source: TSource

        The source objects.

      • customizer: (
            value: any,
            srcValue: any,
            key: string,
            object: any,
            source: any,
            stack: any,
        ) => any

        The function to customize assigned values.

      Returns TObject & TSource

      Returns object.

      function customizer(objValue, srcValue) {
      if (_.isArray(objValue)) {
      return objValue.concat(srcValue);
      }
      }

      var object = {
      'fruits': ['apple'],
      'vegetables': ['beet']
      };

      var other = {
      'fruits': ['banana'],
      'vegetables': ['carrot']
      };

      _.mergeWith(object, other, customizer);
      // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
    • Type Parameters

      • TObject
      • TSource1
      • TSource2

      Parameters

      • object: TObject
      • source1: TSource1
      • source2: TSource2
      • customizer: (
            value: any,
            srcValue: any,
            key: string,
            object: any,
            source: any,
            stack: any,
        ) => any

      Returns TObject & TSource1 & TSource2

      _.mergeWith

    • Type Parameters

      • TObject
      • TSource1
      • TSource2
      • TSource3

      Parameters

      • object: TObject
      • source1: TSource1
      • source2: TSource2
      • source3: TSource3
      • customizer: (
            value: any,
            srcValue: any,
            key: string,
            object: any,
            source: any,
            stack: any,
        ) => any

      Returns TObject & TSource1 & TSource2 & TSource3

      _.mergeWith

    • Type Parameters

      • TObject
      • TSource1
      • TSource2
      • TSource3
      • TSource4

      Parameters

      • object: TObject
      • source1: TSource1
      • source2: TSource2
      • source3: TSource3
      • source4: TSource4
      • customizer: (
            value: any,
            srcValue: any,
            key: string,
            object: any,
            source: any,
            stack: any,
        ) => any

      Returns TObject & TSource1 & TSource2 & TSource3 & TSource4

      _.mergeWith

    • Parameters

      • object: any
      • ...otherArgs: any[]

      Returns any

      _.mergeWith