diff --git a/lodash.src.js b/lodash.src.js index cec9e8829..939d1b9ee 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -8697,12 +8697,13 @@ * _.isFunction(/abc/); * // => false */ - var isFunction = !(baseIsFunction(/x/) || (Uint8Array && !baseIsFunction(Uint8Array))) ? baseIsFunction : function(value) { + function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator // in older versions of Chrome and Safari which return 'function' for regexes // and Safari 8 equivalents which return 'object' for typed array constructors. - return objToString.call(value) == funcTag; - }; + var type = typeof value; + return type == 'function' || (type == 'object' && objToString.call(value) == funcTag); + } /** * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.