MCPcopy
hub / github.com/lodash/lodash / isFunction

Function isFunction

lodash.js:11746–11754  ·  view source on GitHub ↗

* 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 * * _.is

(value)

Source from the content-addressed store, hash-verified

11744 * // => false
11745 */
11746 function isFunction(value) {
11747 if (!isObject(value)) {
11748 return false;
11749 }
11750 // The use of `Object#toString` avoids issues with the `typeof` operator
11751 // in Safari 9 which returns 'object' for typed arrays and other constructors.
11752 var tag = baseGetTag(value);
11753 return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
11754 }
11755
11756 /**
11757 * Checks if `value` is an integer.

Callers 9

baseFunctionsFunction · 0.85
baseIsNativeFunction · 0.85
baseMergeDeepFunction · 0.85
isArrayLikeFunction · 0.85
resultFunction · 0.85
transformFunction · 0.85
mixinFunction · 0.85
baseConvertFunction · 0.85
cloneByPathFunction · 0.85

Calls 2

isObjectFunction · 0.85
baseGetTagFunction · 0.85

Tested by

no test coverage detected