cli icon indicating copy to clipboard operation
cli copied to clipboard

Use EcmaScript 2023 for `toSorted`

Open Tlacenka opened this issue 1 year ago • 1 comments
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 .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

Tlacenka avatar Jan 17 '24 20:01 Tlacenka

Will have a look when updating to ES build

vmasek avatar Mar 07 '24 13:03 vmasek