-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
25 lines (25 loc) · 845 Bytes
/
index.js
File metadata and controls
25 lines (25 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
(function() {
'use strict';
var isFunction = function(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;
};
// Fallback for environments that return incorrect `typeof` operator results.
if (isFunction(/x/) || (Uint8Array && !isFunction(Uint8Array))) {
isFunction = function(value) {
return Object.prototype.toString.call(value) === '[object Function]';
};
}
if (typeof exports === 'object') {
module.exports = isFunction;
} else if (typeof define === 'function' && define.amd) {
define([], function() {
return isFunction;
});
} else {
if (typeof Function.isFunction === 'undefined') {
Function.isFunction = isFunction;
}
}
}());