Documentation
    Preparing search index...

    Function cloneDeepPlainValues

    • This function is used to create a deep clone of plain values. It can handle arrays, plain objects, and primitives. For non-plain objects, it either transfers them as is or throws an error, based on the transferUnclonables flag.

      Type Parameters

      • T

      Parameters

      • value: T

        The value to be cloned.

      • OptionaltransferUnclonables: boolean

        A flag indicating whether to transfer unclonable values as is. If false, the function will throw an error when encountering an unclonable value.

      Returns T

      The cloned value.

      Throws an error if the function encounters a non-plain object and transferUnclonables is false.