mirror of
https://github.com/nodejs/node.git
synced 2025-08-17 22:58:52 +02:00

PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss <me@silverwind.io>
15 lines
519 B
JavaScript
15 lines
519 B
JavaScript
/**
|
|
* The base implementation of `_.isFunction` without support for environments
|
|
* with incorrect `typeof` results.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
|
*/
|
|
function baseIsFunction(value) {
|
|
// Avoid a Chakra JIT bug in compatibility modes of IE 11.
|
|
// See https://github.com/jashkenas/underscore/issues/1621 for more details.
|
|
return typeof value == 'function' || false;
|
|
}
|
|
|
|
module.exports = baseIsFunction;
|