repo.or.cz
/
ProtonMail-WebClient.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge branch 'format-suggestion-summary' into 'main'
[ProtonMail-WebClient.git]
/
packages
/
wallet
/
utils
/
array.ts
blob
09b9278fc80c24686996ee6d1d317afa18f23eb5
1
export const replaceAt = <T>(array: T[], index: number, item: T) => {
2
return index > -1 ? [...array.slice(0, index), item, ...array.slice(index + 1, array.length)] : array;
3
};