Created
February 7, 2015 19:04
-
-
Save samarpanda/140688282c42c967f57d to your computer and use it in GitHub Desktop.
Detect if function is native to browser
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
var numf=0; var nump=0; var numo=0; | |
for(var p in this) { | |
if(typeof(this[p]) === "function"){ | |
if(this[p].toString().indexOf('[native code]') === -1){ | |
numf+=1; | |
console.log(p+"()"); | |
} | |
} else if(typeof p != 'undefined'){ | |
nump+=1; | |
console.log(p); | |
} else { | |
numo+=1; | |
console.log(p); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment