insertAt
insertAt<
A>(index,item): (data) => readonlyA[]
Defined in: Utils/Arr.ts:545
Returns a new array with item inserted before the element at index.
Negative indices are clamped to 0; indices beyond the array length append to the end.
Type Parameters
Section titled “Type Parameters”A
Parameters
Section titled “Parameters”number
A
Returns
Section titled “Returns”(
data): readonlyA[]
Parameters
Section titled “Parameters”readonly A[]
Returns
Section titled “Returns”readonly A[]