isFunction.js 588 B

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