* Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFun
(value)
| 722 | * // => false |
| 723 | */ |
| 724 | function isFunction(value) { |
| 725 | // The use of `Object#toString` avoids issues with the `typeof` operator |
| 726 | // in Safari 8-9 which returns 'object' for typed array and other constructors. |
| 727 | const tag = isObject(value) ? objectToString.call(value) : ""; |
| 728 | return tag === funcTag || tag === genTag; |
| 729 | } |
| 730 | |
| 731 | /** |
| 732 | * Checks if `value` is a valid array-like length. |
no test coverage detected