Convert remaining vars to let/const.

This commit is contained in:
John-David Dalton
2017-01-09 13:53:41 -08:00
parent 40e9c66ca6
commit c2208f82dc
12 changed files with 37 additions and 21 deletions

View File

@@ -62,10 +62,11 @@ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arit
arity = arity === undefined ? arity : toInteger(arity);
length -= holders ? holders.length : 0;
let holdersRight;
let partialsRight;
if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
var partialsRight = partials,
holdersRight = holders;
partialsRight = partials,
holdersRight = holders;
partials = holders = undefined;
}
const data = isBindKey ? undefined : getData(func);
@@ -90,8 +91,9 @@ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arit
if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
}
let result;
if (!bitmask || bitmask == WRAP_BIND_FLAG) {
var result = createBind(func, bitmask, thisArg);
result = createBind(func, bitmask, thisArg);
} else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
result = createCurry(func, bitmask, arity);
} else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {