Function cloneArray

  • Clones an array. If deep is false (default) the clone will be shallow. Otherwise structuredClone is used.

    Returns

    The new array

    See

    clone

    Type Parameters

    • T

    Parameters

    • arr: T[]

      The array to clone

    • Optional deep: boolean = false

      Creates a deep clone using structuredClone if true.

    Returns T[]

Generated using TypeDoc