mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Bump to v3.10.0.
This commit is contained in:
@@ -1,17 +1,14 @@
|
||||
import isArrayLike from '../internal/isArrayLike';
|
||||
import isObjectLike from '../internal/isObjectLike';
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var argsTag = '[object Arguments]';
|
||||
|
||||
/** Used for native method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objToString = objectProto.toString;
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/** Native method references. */
|
||||
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as an `arguments` object.
|
||||
@@ -30,7 +27,8 @@ var objToString = objectProto.toString;
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
return isObjectLike(value) && isArrayLike(value) && objToString.call(value) == argsTag;
|
||||
return isObjectLike(value) && isArrayLike(value) &&
|
||||
hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
|
||||
}
|
||||
|
||||
export default isArguments;
|
||||
|
||||
Reference in New Issue
Block a user