mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Bump to v3.9.0.
This commit is contained in:
@@ -18,11 +18,8 @@ define(['./LodashWrapper', './getData', './getFuncName', '../lang/isArray', './i
|
||||
*/
|
||||
function createFlow(fromRight) {
|
||||
return function() {
|
||||
var length = arguments.length;
|
||||
if (!length) {
|
||||
return function() { return arguments[0]; };
|
||||
}
|
||||
var wrapper,
|
||||
length = arguments.length,
|
||||
index = fromRight ? length : -1,
|
||||
leftIndex = 0,
|
||||
funcs = Array(length);
|
||||
@@ -32,15 +29,17 @@ define(['./LodashWrapper', './getData', './getFuncName', '../lang/isArray', './i
|
||||
if (typeof func != 'function') {
|
||||
throw new TypeError(FUNC_ERROR_TEXT);
|
||||
}
|
||||
var funcName = wrapper ? '' : getFuncName(func);
|
||||
wrapper = funcName == 'wrapper' ? new LodashWrapper([]) : wrapper;
|
||||
if (!wrapper && LodashWrapper.prototype.thru && getFuncName(func) == 'wrapper') {
|
||||
wrapper = new LodashWrapper([]);
|
||||
}
|
||||
}
|
||||
index = wrapper ? -1 : length;
|
||||
while (++index < length) {
|
||||
func = funcs[index];
|
||||
funcName = getFuncName(func);
|
||||
|
||||
var data = funcName == 'wrapper' ? getData(func) : null;
|
||||
var funcName = getFuncName(func),
|
||||
data = funcName == 'wrapper' ? getData(func) : null;
|
||||
|
||||
if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) {
|
||||
wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
|
||||
} else {
|
||||
@@ -53,7 +52,7 @@ define(['./LodashWrapper', './getData', './getFuncName', '../lang/isArray', './i
|
||||
return wrapper.plant(args[0]).value();
|
||||
}
|
||||
var index = 0,
|
||||
result = funcs[index].apply(this, args);
|
||||
result = length ? funcs[index].apply(this, args) : args[0];
|
||||
|
||||
while (++index < length) {
|
||||
result = funcs[index].call(this, result);
|
||||
|
||||
Reference in New Issue
Block a user