mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Apply more let/const transforms.
This commit is contained in:
@@ -15,19 +15,19 @@ import compareAscending from './_compareAscending.js';
|
||||
* @returns {number} Returns the sort order indicator for `object`.
|
||||
*/
|
||||
function compareMultiple(object, other, orders) {
|
||||
var index = -1,
|
||||
objCriteria = object.criteria,
|
||||
othCriteria = other.criteria,
|
||||
length = objCriteria.length,
|
||||
ordersLength = orders.length;
|
||||
let index = -1;
|
||||
const objCriteria = object.criteria;
|
||||
const othCriteria = other.criteria;
|
||||
const length = objCriteria.length;
|
||||
const ordersLength = orders.length;
|
||||
|
||||
while (++index < length) {
|
||||
var result = compareAscending(objCriteria[index], othCriteria[index]);
|
||||
const result = compareAscending(objCriteria[index], othCriteria[index]);
|
||||
if (result) {
|
||||
if (index >= ordersLength) {
|
||||
return result;
|
||||
}
|
||||
var order = orders[index];
|
||||
const order = orders[index];
|
||||
return result * (order == 'desc' ? -1 : 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user