Created
January 11, 2014 07:00
-
-
Save kenji0x02/8367947 to your computer and use it in GitHub Desktop.
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
isEmptyObject: function(obj){ | |
if (Object.keys(obj).length === 0) { | |
// or if(!Object.keys(obj).length) | |
return true; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment