mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Merging in #321
This commit is contained in:
@@ -758,16 +758,15 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Is a given variable an arguments object?
|
// Is a given variable an arguments object?
|
||||||
_.isArguments = toString.call(arguments) == '[object Arguments]'
|
if (toString.call(arguments) == '[object Arguments]') {
|
||||||
? function(obj) {
|
_.isArguments = function(obj) {
|
||||||
return toString.call(obj) == '[object Arguments]';
|
return toString.call(obj) == '[object Arguments]';
|
||||||
}
|
|
||||||
: function(obj) {
|
|
||||||
return obj
|
|
||||||
? hasOwnProperty.call(obj, 'callee')
|
|
||||||
&& hasOwnProperty.call(obj, 'length')
|
|
||||||
: false;
|
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
_.isArguments = function(obj) {
|
||||||
|
return !!(obj && hasOwnProperty.call(obj, 'callee'));
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Is a given value a function?
|
// Is a given value a function?
|
||||||
_.isFunction = function(obj) {
|
_.isFunction = function(obj) {
|
||||||
|
|||||||
Reference in New Issue
Block a user