mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-04 19:57:20 +02:00
Pardon the noise. More tab to space conversion!
This commit is contained in:
parent
c3635bb26b
commit
1d8be6b014
128 changed files with 8017 additions and 8017 deletions
|
@ -1,15 +1,15 @@
|
|||
/* jslint node: true */
|
||||
'use strict';
|
||||
|
||||
// deps
|
||||
const _ = require('lodash');
|
||||
// deps
|
||||
const _ = require('lodash');
|
||||
|
||||
exports.sortAreasOrConfs = sortAreasOrConfs;
|
||||
exports.sortAreasOrConfs = sortAreasOrConfs;
|
||||
|
||||
//
|
||||
// Method for sorting message, file, etc. areas and confs
|
||||
// If the sort key is present and is a number, sort in numerical order;
|
||||
// Otherwise, use a locale comparison on the sort key or name as a fallback
|
||||
// Method for sorting message, file, etc. areas and confs
|
||||
// If the sort key is present and is a number, sort in numerical order;
|
||||
// Otherwise, use a locale comparison on the sort key or name as a fallback
|
||||
//
|
||||
function sortAreasOrConfs(areasOrConfs, type) {
|
||||
let entryA;
|
||||
|
@ -24,7 +24,7 @@ function sortAreasOrConfs(areasOrConfs, type) {
|
|||
} else {
|
||||
const keyA = entryA.sort ? entryA.sort.toString() : entryA.name;
|
||||
const keyB = entryB.sort ? entryB.sort.toString() : entryB.name;
|
||||
return keyA.localeCompare(keyB, { sensitivity : false, numeric : true } ); // "natural" compare
|
||||
return keyA.localeCompare(keyB, { sensitivity : false, numeric : true } ); // "natural" compare
|
||||
}
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue