mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 10:17:48 +00:00
Remove isArrayLike helper.
This commit is contained in:
committed by
jdalton
parent
d1761558b4
commit
fb2a20201c
@@ -2461,10 +2461,10 @@
|
|||||||
* @returns {Object} Returns the destination object.
|
* @returns {Object} Returns the destination object.
|
||||||
*/
|
*/
|
||||||
function baseMerge(object, source, customizer, stackA, stackB) {
|
function baseMerge(object, source, customizer, stackA, stackB) {
|
||||||
var isSrcArr = isArrayLike(source);
|
var isSrcArr = isArray(source) || isTypedArray(source);
|
||||||
|
|
||||||
(isSrcArr ? arrayEach : baseForOwn)(source, function(srcValue, key, source) {
|
(isSrcArr ? arrayEach : baseForOwn)(source, function(srcValue, key, source) {
|
||||||
var isArr = isArrayLike(srcValue),
|
var isArr = isArray(srcValue) || isTypedArray(srcValue),
|
||||||
isObj = isPlainObject(srcValue),
|
isObj = isPlainObject(srcValue),
|
||||||
value = object[key];
|
value = object[key];
|
||||||
|
|
||||||
@@ -3664,18 +3664,6 @@
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if `value` is an array-like object.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {*} value The value to check.
|
|
||||||
* @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.
|
|
||||||
*/
|
|
||||||
function isArrayLike(value) {
|
|
||||||
return (isObjectLike(value) && isLength(value.length) &&
|
|
||||||
(arrayLikeTags[objToString.call(value)] || (!lodash.support.argsTag && isArguments(value)))) || false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if `func` is eligible for `this` binding.
|
* Checks if `func` is eligible for `this` binding.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user