mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-09-21 02:17:29 +02:00
fix(sorting): sort numeric names naturally
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
const naturalNameCollator = new Intl.Collator(undefined, { numeric: true });
|
||||
|
||||
export function compareNaturalNames(left: string, right: string): number {
|
||||
return naturalNameCollator.compare(left, right);
|
||||
}
|
||||
Reference in New Issue
Block a user