cli
cli copied to clipboard
Use EcmaScript 2023 for `toSorted`
trafficstars
As a contributor, I often come across sorting. I want to have toSorted at my disposal to avoid mutability or having to spread my arrays before sorting them.
Acceptance criteria
- [ ] Switch to ECMAScript 2023 which introduces toSorted.
Acceptance criteria
- [ ] refactor
.sortthat directly followsArrayspread to.toSorted
Implementation details
Any .sort used after .map, .filter, .reduce or Set/Iterator spreading, should not be refactored as the mutating behavior of .sort might be desired for perf benefit
Will have a look when updating to ES build