Skip to content

Instantly share code, notes, and snippets.

@zanza00
Created March 24, 2016 14:30
Show Gist options
  • Save zanza00/58637efadfb3255507cb to your computer and use it in GitHub Desktop.
Save zanza00/58637efadfb3255507cb to your computer and use it in GitHub Desktop.
Function that checks if something is a function, YO DAWG
/**
* 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