Function cloneDeep

  • Deep clone of object.

    Like JSON.parse(JSON.stringify(obj)), but supports basic javascript types (string, number, object), Date and RegExps and cycles.

    Throws error if enounters object with prototype assuming that in general class instances cannot be reliably cloned by generic algorithm.

    Type Parameters

    • T

    Parameters

    • obj: T

    Returns T