Options
All
  • Public
  • Public/Protected
  • All
Menu

Module object/mergeDeep

Index

References

Functions

References

Renames and re-exports mergeDeep

Functions

  • mergeDeep(t1: any): (t2: any) => any
  • mergeDeep(t1: any, t2: any): any
  • Create a new object with the own properties of the first object deeply merged with the own properties of the other objects. If a key exists in several objects, then all values associated with this key are merged recursively unless at least one of them is not a plain object. Merging is done from left to right.

    example
     mergeDeep({ 'name': 'fred', 'info': { 'age': 10, 'sex': 'm' } }, { 'info': { 'age': 40 }); //=> { 'name': 'fred', 'info': { 'age': 40, 'sex': 'm' } }
    

    Parameters

    • t1: any

    Returns (t2: any) => any

      • (t2: any): any
      • Parameters

        • t2: any

        Returns any

  • Create a new object with the own properties of the first object deeply merged with the own properties of the other objects. If a key exists in several objects, then all values associated with this key are merged recursively unless at least one of them is not a plain object. Merging is done from left to right.

    example
     mergeDeep({ 'name': 'fred', 'info': { 'age': 10, 'sex': 'm' } }, { 'info': { 'age': 40 }); //=> { 'name': 'fred', 'info': { 'age': 40, 'sex': 'm' } }
    

    Parameters

    • t1: any
    • t2: any

    Returns any

Generated using TypeDoc