Sid Gifari File Manager
🏠 Root
/
home
/
genremedia08
/
musicjukebox.overlookedtracks.com
/
common
/
resources
/
client
/
utils
/
array
/
Editing: prepend-to-array-at-index.ts
export function prependToArrayAtIndex<T>(array: T[], toAdd: T[], index = 0): T[] { const copyOfArray = [...array]; const tail = copyOfArray.splice(index + 1); return [...copyOfArray, ...toAdd, ...tail]; }
Save
Cancel