Created
August 18, 2014 06:56
-
-
Save ochronus/ff046314a7ea62f01213 to your computer and use it in GitHub Desktop.
Check if a JS function is native
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
function isNative(fn) { | |
return (/\{\s*\[native code\]\s*\}/).test('' + fn); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment