mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Bump to v3.8.0.
This commit is contained in:
@@ -4,6 +4,12 @@ var LodashWrapper = require('./LodashWrapper'),
|
||||
isArray = require('../lang/isArray'),
|
||||
isLaziable = require('./isLaziable');
|
||||
|
||||
/** Used to compose bitmasks for wrapper metadata. */
|
||||
var CURRY_FLAG = 8,
|
||||
PARTIAL_FLAG = 32,
|
||||
ARY_FLAG = 128,
|
||||
REARG_FLAG = 256;
|
||||
|
||||
/** Used as the `TypeError` message for "Functions" methods. */
|
||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
|
||||
@@ -39,7 +45,7 @@ function createFlow(fromRight) {
|
||||
funcName = getFuncName(func);
|
||||
|
||||
var data = funcName == 'wrapper' ? getData(func) : null;
|
||||
if (data && isLaziable(data[0])) {
|
||||
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 {
|
||||
wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func);
|
||||
|
||||
Reference in New Issue
Block a user