JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "prepend-to-array-at-index.ts"

Full Path: /home/markqprx/iniasli.pro/client/utils/array/prepend-to-array-at-index.ts
File size: 211 bytes
MIME-type: text/plain
Charset: utf-8

export function prependToArrayAtIndex<T>(array: T[], toAdd: T[], index = 0): T[] {
  const copyOfArray = [...array];
  const tail = copyOfArray.splice(index + 1);
  return [...copyOfArray, ...toAdd, ...tail];
}