Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
Check if a property exists - for use in debugger only. Very slow operation
// Note: this function is evil, and probably should never be used.
// It may be useful for when you are working in the console/debugger
// and need to analyze some large object. Not for production.
function propDeepExists(target, propPath){
try {
var result = eval("target." + propPath);
} catch(e){
return false;
return result ? true : false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment