Last active
December 15, 2015 00:08
-
-
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.
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
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