Created
August 16, 2017 22:11
-
-
Save tomnagengast/c776c5c028bdac7dee1b4b46d17cd233 to your computer and use it in GitHub Desktop.
This file contains 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
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