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.

14 lines 441 B
/** * @public * Modifies input array by inserting at given index. * @param items - The array to modify. * @param itemToInsert - The thing to insert. * @param insertAtIndex - Where to insert it. Pun intended. * * @remarks * See {@link arrayInsertAtIndex}. */ export function arrayInsertAtIndex(items, itemToInsert, insertAtIndex) { items.splice(insertAtIndex, 0, itemToInsert); } //# sourceMappingURL=array-insert-at-index.js.map