@moffintosh oh dear lord no matter how many JS horrors I see, it always manages to up the stakes
@Amikke @moffintosh well yeah, it sorts numbers as text because that's a good idea and using typed languages is way too complicated
@uberrice @moffintosh better yet, it then converts them back to numbers so that it's not immediately obvious string-comparing shenanigans happened. Very JS moment.
@moffintosh so apparently the default `.sort()` compares UTF-16 code units. It will not only sort -2 before -7, it will also sort 10 before 9. Truly cursed stuff.