mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-07-28 16:32:37 -04:00
natural sort devices by name
meaning, 1-2-10 instead of 1-10-2
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
export function sortDevices(a, b) {
|
||||
return a.name > b.name;
|
||||
return a.name.localeCompare(b.name, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: 'base'
|
||||
});
|
||||
}
|
||||
|
||||
export function sortPorts(a, b) {
|
||||
|
||||
Reference in New Issue
Block a user