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
[x] Switch to ECMAScript 2023 which introduces toSorted.
Acceptance criteria
[x] refactor .sort that directly follows Array spread 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
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
Acceptance criteria
.sort
that directly followsArray
spread to.toSorted
Implementation details
Any
.sort
used after.map
,.filter
,.reduce
orSet
/Iterator
spreading, should not be refactored as the mutating behavior of.sort
might be desired for perf benefit