aboutsummaryrefslogtreecommitdiffstats
path: root/src/var/isFunction.js
blob: dad662e4fd21e8f4642d31e9fb3ff0c5e67e41f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
define( function() {
	"use strict";

	return function isFunction( obj ) {

      // Support: Chrome <=57, Firefox <=52
      // In some browsers, typeof returns "function" for HTML <object> elements
      // (i.e., `typeof document.createElement( "object" ) === "function"`).
      // We don't want to classify *any* DOM node as a function.
      return typeof obj === "function" && typeof obj.nodeType !== "number";
  };

} );