mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Apply more let/const transforms.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeMax = Math.max;
|
||||
const nativeMax = Math.max;
|
||||
|
||||
/**
|
||||
* This function is like `composeArgs` except that the arguments composition
|
||||
@@ -13,20 +13,21 @@ var nativeMax = Math.max;
|
||||
* @returns {Array} Returns the new array of composed arguments.
|
||||
*/
|
||||
function composeArgsRight(args, partials, holders, isCurried) {
|
||||
var argsIndex = -1,
|
||||
argsLength = args.length,
|
||||
holdersIndex = -1,
|
||||
holdersLength = holders.length,
|
||||
rightIndex = -1,
|
||||
rightLength = partials.length,
|
||||
rangeLength = nativeMax(argsLength - holdersLength, 0),
|
||||
result = Array(rangeLength + rightLength),
|
||||
isUncurried = !isCurried;
|
||||
let argsIndex = -1;
|
||||
let holdersIndex = -1;
|
||||
let rightIndex = -1;
|
||||
|
||||
const argsLength = args.length;
|
||||
const holdersLength = holders.length;
|
||||
const rightLength = partials.length;
|
||||
const rangeLength = nativeMax(argsLength - holdersLength, 0);
|
||||
const result = Array(rangeLength + rightLength);
|
||||
const isUncurried = !isCurried;
|
||||
|
||||
while (++argsIndex < rangeLength) {
|
||||
result[argsIndex] = args[argsIndex];
|
||||
}
|
||||
var offset = argsIndex;
|
||||
const offset = argsIndex;
|
||||
while (++rightIndex < rightLength) {
|
||||
result[offset + rightIndex] = partials[rightIndex];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user