@vsokolov/utils - v0.32.0
    Preparing search index...

    Function insertItemAtIndex

    • Insert an item at a given index

      Type Parameters

      • T

      Parameters

      • index: number | IndexCallback<T>

        An index or a callback provided to findIndex

      • value: T

        The value of the item to insert

      • Optionalarr: T[] | null

        The array to insert into

      Returns T[]

      New array with the item inserted