Skip to content

Instantly share code, notes, and snippets.

@allanbatista
Last active December 15, 2015 00:08
Show Gist options
  • Save allanbatista/5170267 to your computer and use it in GitHub Desktop.
Save allanbatista/5170267 to your computer and use it in GitHub Desktop.
Verifica se um objeto passado por parâmetro é vazio em javascript. Checks if an object passed as parameter is empty in javascript.
function isEmptyObject(obj){
for(undefined in obj){
return false;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment