Skip to content

Instantly share code, notes, and snippets.

@kangax
Created December 11, 2008 21:08
Show Gist options
  • Select an option

  • Save kangax/34873 to your computer and use it in GitHub Desktop.

Select an option

Save kangax/34873 to your computer and use it in GitHub Desktop.
function isArguments(o) {
function isPropertyDontEnum(o, prop) {
for (var p in o) {
if (p === prop) return false;
}
return true;
}
return (typeof o == 'object' && 'length' in o &&
isPropertyDontEnum(o, 'callee'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment