Skip to content

Instantly share code, notes, and snippets.

@kenji0x02
Created January 11, 2014 07:00
Show Gist options
  • Save kenji0x02/8367947 to your computer and use it in GitHub Desktop.
Save kenji0x02/8367947 to your computer and use it in GitHub Desktop.
JavaScriptで空オブジェクトの判定
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