Options
All
  • Public
  • Public/Protected
  • All
Menu

Module cloneDeep

Index

References

Functions Lang

References

Renames and re-exports cloneDeep

Lang Functions

  • cloneDeep<T>(value: T): T
  • This method is like clone except that it recursively clones value. Object inheritance is preserved.

    since

    5.3.0

    see

    clone

    example
    const objects = [{ 'a': 1 }, { 'b': 2 }]

    const deep = cloneDeep(objects)
    console.log(deep[0] === objects[0])
    // => false

    Type parameters

    • T

    Parameters

    • value: T

      The value to recursively clone.

    Returns T

    Returns the deep cloned value.