暫無描述

isFunction.js 528B

123456789101112131415
  1. import tagTester from './_tagTester.js';
  2. import { root } from './_setup.js';
  3. var isFunction = tagTester('Function');
  4. // Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
  5. // v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
  6. var nodelist = root.document && root.document.childNodes;
  7. if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
  8. isFunction = function(obj) {
  9. return typeof obj == 'function' || false;
  10. };
  11. }
  12. export default isFunction;