Skip to content

Instantly share code, notes, and snippets.

@mcbrwr
Created October 21, 2013 10:01
Show Gist options
  • Save mcbrwr/7081449 to your computer and use it in GitHub Desktop.
Save mcbrwr/7081449 to your computer and use it in GitHub Desktop.
check if given argument is a function
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