Simplify _.isFunction.

This commit is contained in:
John-David Dalton
2015-10-05 11:06:49 -07:00
parent 6d5c6b2de7
commit 7da4ea5ecb

View File

@@ -9130,10 +9130,7 @@
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array constructors, and
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
if (!isObject(value)) {
return false;
}
var tag = objToString.call(value);
var tag = isObject(value) ? objToString.call(value) : '';
return tag == funcTag || tag == genTag;
}