mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Simplify _.isFunction.
This commit is contained in:
@@ -9130,10 +9130,7 @@
|
|||||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||||
// in Safari 8 which returns 'object' for typed array constructors, and
|
// in Safari 8 which returns 'object' for typed array constructors, and
|
||||||
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||||
if (!isObject(value)) {
|
var tag = isObject(value) ? objToString.call(value) : '';
|
||||||
return false;
|
|
||||||
}
|
|
||||||
var tag = objToString.call(value);
|
|
||||||
return tag == funcTag || tag == genTag;
|
return tag == funcTag || tag == genTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user