baseIsFunction.js 519 B

123456789101112131415
  1. /**
  2. * The base implementation of `_.isFunction` without support for environments
  3. * with incorrect `typeof` results.
  4. *
  5. * @private
  6. * @param {*} value The value to check.
  7. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
  8. */
  9. function baseIsFunction(value) {
  10. // Avoid a Chakra JIT bug in compatibility modes of IE 11.
  11. // See https://github.com/jashkenas/underscore/issues/1621 for more details.
  12. return typeof value == 'function' || false;
  13. }
  14. module.exports = baseIsFunction;