Exploring File Sorting in qBittorrent, a BitTorrent Client
Note: I have no personal interest in torrents or files, and I haven't engaged in downloading any of them.
How can we achieve similar string sorting behavior in JavaScript as seen in qBittorrent? The logic seems intentional rather than random.
Initial Attempt
strings.sort((a, b) => a.localeCompare(b, "en", {
sensitivity: "case",
caseFirst: "upper",
numeric: true
}));
Unexpected Outcome
[
"1.ico",
"01.ico",
"03.ico",
"04.ico",
"05.ico",
…
]