Created
March 24, 2016 14:30
-
-
Save zanza00/58637efadfb3255507cb to your computer and use it in GitHub Desktop.
Function that checks if something is a function, YO DAWG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* isFunction - Function that check if a something is a function, yo dawg | |
* | |
* @param {...*} functionToCheck function to check without the parens () | |
* @return {boolean} | |
*/ | |
function isFunction( functionToCheck ) { | |
var getType = {}; | |
return functionToCheck && getType.toString.call( functionToCheck ) === '[object Function]'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment