mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Move createRecurryWrapper lower in source.
This commit is contained in:
48
lodash.js
48
lodash.js
@@ -4073,30 +4073,6 @@
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
function createRecurryWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity, wrapperFunc) {
|
||||
var isCurry = bitmask & CURRY_FLAG,
|
||||
isCurryBound = bitmask & CURRY_BOUND_FLAG,
|
||||
newArgPos = argPos ? copyArray(argPos) : undefined,
|
||||
newsHolders = isCurry ? holders : undefined,
|
||||
newHoldersRight = isCurry ? undefined : holders,
|
||||
newPartials = isCurry ? partials : undefined,
|
||||
newPartialsRight = isCurry ? undefined : partials;
|
||||
|
||||
bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
|
||||
bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
|
||||
|
||||
if (!isCurryBound) {
|
||||
bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
|
||||
}
|
||||
var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, arity],
|
||||
result = wrapperFunc.apply(undefined, newData);
|
||||
|
||||
if (isLaziable(func)) {
|
||||
setData(result, newData);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function like `_.conj`.
|
||||
*
|
||||
@@ -4205,6 +4181,30 @@
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
function createRecurryWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity, wrapperFunc) {
|
||||
var isCurry = bitmask & CURRY_FLAG,
|
||||
isCurryBound = bitmask & CURRY_BOUND_FLAG,
|
||||
newArgPos = argPos ? copyArray(argPos) : undefined,
|
||||
newsHolders = isCurry ? holders : undefined,
|
||||
newHoldersRight = isCurry ? undefined : holders,
|
||||
newPartials = isCurry ? partials : undefined,
|
||||
newPartialsRight = isCurry ? undefined : partials;
|
||||
|
||||
bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
|
||||
bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
|
||||
|
||||
if (!isCurryBound) {
|
||||
bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
|
||||
}
|
||||
var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, arity],
|
||||
result = wrapperFunc.apply(undefined, newData);
|
||||
|
||||
if (isLaziable(func)) {
|
||||
setData(result, newData);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function like `_.round`.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user