UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

90 lines (42 loc) 1.05 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [rc-js-util](./rc-js-util.md) &gt; [arrayInsertAtIndex](./rc-js-util.arrayinsertatindex.md) ## arrayInsertAtIndex() function Modifies input array by inserting at given index. **Signature:** ```typescript export declare function arrayInsertAtIndex<TItem>(items: TItem[], itemToInsert: TItem, insertAtIndex: number): void; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> items </td><td> TItem\[\] </td><td> The array to modify. </td></tr> <tr><td> itemToInsert </td><td> TItem </td><td> The thing to insert. </td></tr> <tr><td> insertAtIndex </td><td> number </td><td> Where to insert it. Pun intended. </td></tr> </tbody></table> **Returns:** void ## Remarks See [arrayInsertAtIndex()](./rc-js-util.arrayinsertatindex.md)<!-- -->.