mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
ba4300d9e1
Migrate "Add Files" modal to React GitOrigin-RevId: fc5235108ee65294e3176da9c327791c34aa5b3c
11 lines
404 B
JavaScript
11 lines
404 B
JavaScript
// The collator used to sort files docs and folders in the tree.
|
|
// Uses English as base language for consistency.
|
|
// Options used:
|
|
// numeric: true so 10 comes after 2
|
|
// sensitivity: 'variant' so case and accent are not equal
|
|
// caseFirst: 'upper' so upper-case letters come first
|
|
export const fileCollator = new Intl.Collator('en', {
|
|
numeric: true,
|
|
sensitivity: 'variant',
|
|
caseFirst: 'upper'
|
|
})
|