OrderBy sorts in ASCII style
mstrzoda opened this issue · comments
OrderBy sorts first big letters, then small and then special characters like language specific letters. List like this: "Ägypten", "Griechenland", "Deutschland" will be sorted in that way:
"Deutschland", "Griechenland", "Ägypten". "Ägypten" should be first in that example.
Is this an issue? I mean, JavaScript can only order strings according to ASCII positions, if not you would have to provide your custom sorting according to your specific needs/language, how would you improve this?
i think we could use at some point this function:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare,
or we should allow devs to inject his own comparer like in original OrderBy:
https://msdn.microsoft.com/pl-pl/library/bb549422(v=vs.110).aspx
Great feedback! I think the most flexible solution is to implement the optional comparer parameter, and it is also an easy fix!
If you have some free time please do that, i have huuuuuuuge task to do by the end of the month (i don't know if i will have time for sleep :/)
The release is available on:
Your semantic-release bot
great, big thx!
Hope you like the new test
Lines 479 to 484 in e641364
schööööön!