mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Remove unnecessary lodash binding.
This commit is contained in:
@@ -6168,7 +6168,7 @@
|
|||||||
wrapped = new LazyWrapper(this);
|
wrapped = new LazyWrapper(this);
|
||||||
}
|
}
|
||||||
wrapped = wrapped.reverse();
|
wrapped = wrapped.reverse();
|
||||||
wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': lodash });
|
wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
|
||||||
return new LodashWrapper(wrapped, this.__chain__);
|
return new LodashWrapper(wrapped, this.__chain__);
|
||||||
}
|
}
|
||||||
return this.thru(interceptor);
|
return this.thru(interceptor);
|
||||||
@@ -12281,27 +12281,30 @@
|
|||||||
iteratee = args[0],
|
iteratee = args[0],
|
||||||
useLazy = isLazy || isArray(value);
|
useLazy = isLazy || isArray(value);
|
||||||
|
|
||||||
var interceptor = function(value) {
|
|
||||||
return lodashFunc.apply(lodash, arrayPush([value], args));
|
|
||||||
};
|
|
||||||
if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
|
if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
|
||||||
// Avoid lazy use if the iteratee has a "length" value other than `1`.
|
// Avoid lazy use if the iteratee has a "length" value other than `1`.
|
||||||
isLazy = useLazy = false;
|
isLazy = useLazy = false;
|
||||||
}
|
}
|
||||||
var onlyLazy = isLazy && !isHybrid;
|
var interceptor = function(value) {
|
||||||
|
return lodashFunc.apply(undefined, arrayPush([value], args));
|
||||||
|
};
|
||||||
|
|
||||||
|
var action = { 'func': thru, 'args': [interceptor], 'thisArg': undefined },
|
||||||
|
onlyLazy = isLazy && !isHybrid;
|
||||||
|
|
||||||
if (retUnwrapped && !chainAll) {
|
if (retUnwrapped && !chainAll) {
|
||||||
if (onlyLazy) {
|
if (onlyLazy) {
|
||||||
value = value.clone();
|
value = value.clone();
|
||||||
value.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': lodash });
|
value.__actions__.push(action);
|
||||||
return func.call(value);
|
return func.call(value);
|
||||||
}
|
}
|
||||||
return lodashFunc.call(lodash, this.value())[0];
|
return lodashFunc.call(undefined, this.value())[0];
|
||||||
}
|
}
|
||||||
if (useLazy) {
|
if (useLazy) {
|
||||||
value = onlyLazy ? value : new LazyWrapper(this);
|
value = onlyLazy ? value : new LazyWrapper(this);
|
||||||
var result = func.apply(value, args);
|
var result = func.apply(value, args);
|
||||||
if (!retUnwrapped) {
|
if (!retUnwrapped) {
|
||||||
result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': lodash });
|
result.__actions__.push(action);
|
||||||
}
|
}
|
||||||
return new LodashWrapper(result, chainAll);
|
return new LodashWrapper(result, chainAll);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user