* Test if the passed argument is a function
(functionToCheck)
| 31 | * Test if the passed argument is a function |
| 32 | */ |
| 33 | function isFunction (functionToCheck) { |
| 34 | if (typeof functionToCheck === "undefined") |
| 35 | { |
| 36 | return false; |
| 37 | } else if (functionToCheck === null) { |
| 38 | return false; |
| 39 | } else { |
| 40 | var getType = {}; |
| 41 | var functionType = getType.toString.call(functionToCheck); |
| 42 | return functionToCheck && (functionType === '[object Function]' || functionType === '[object AsyncFunction]'); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | function isInTest () { |
| 47 | return typeof global.it === 'function'; |
no outgoing calls
no test coverage detected