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.

18 lines 597 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.arrayInsertAtIndex = void 0; /** * @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}. */ function arrayInsertAtIndex(items, itemToInsert, insertAtIndex) { items.splice(insertAtIndex, 0, itemToInsert); } exports.arrayInsertAtIndex = arrayInsertAtIndex; //# sourceMappingURL=array-insert-at-index.js.map