mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
Use natural sort
This commit is contained in:
@@ -41,6 +41,7 @@ window.qBittorrent.Misc = (function() {
|
||||
friendlyFloat: friendlyFloat,
|
||||
parseHtmlLinks: parseHtmlLinks,
|
||||
escapeHtml: escapeHtml,
|
||||
naturalSortCollator: naturalSortCollator,
|
||||
safeTrim: safeTrim,
|
||||
toFixedPointString: toFixedPointString,
|
||||
containsAllTerms: containsAllTerms,
|
||||
@@ -178,6 +179,8 @@ window.qBittorrent.Misc = (function() {
|
||||
return escapedString;
|
||||
};
|
||||
|
||||
const naturalSortCollator = new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' });
|
||||
|
||||
const safeTrim = function(value) {
|
||||
try {
|
||||
return value.trim();
|
||||
|
||||
Reference in New Issue
Block a user