Function insert

  • Performs an efficient array insert operation in the given array. If the index or the array is invalid, it just returns the given array.

    Note: Uses the same behavior as Array.splice.


    The given array.

    Type Parameters

    • T


    • arr: T[]

      The given array to insert into

    • index: number

      The index of the array insert operation.

    • value: T

      The value to insert in the array at the given index.

    Returns T[]

Generated using TypeDoc