Skip to content

Instantly share code, notes, and snippets.

@julsfelic
Created October 13, 2012 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save julsfelic/3884147 to your computer and use it in GitHub Desktop.
Save julsfelic/3884147 to your computer and use it in GitHub Desktop.
JavaScript: isHostMethod
function isHostMethod(object, property) {
var t = typeof object[property];
return t=='function' ||
(!!(t=='object' && object[property])) ||
t=='unknown';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment