Skip to content

Instantly share code, notes, and snippets.

@tomnagengast
Created August 16, 2017 22:11
Show Gist options
  • Save tomnagengast/c776c5c028bdac7dee1b4b46d17cd233 to your computer and use it in GitHub Desktop.
Save tomnagengast/c776c5c028bdac7dee1b4b46d17cd233 to your computer and use it in GitHub Desktop.
module.exports = function function_exists (funcName) { // eslint-disable-line camelcase
var attachFunction = (typeof window !== 'undefined' ? window : global)
if (typeof funcName === 'string') {
funcName = attachFunction[funcName]
}
return typeof funcName === 'function'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment