Created
May 16, 2017 07:36
-
-
Save eshwartm/ceb05e9af2217f6554ab74aa00f5fa71 to your computer and use it in GitHub Desktop.
Check for empty object JavaScript
This file contains hidden or 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
Object.keys(obj).length === 0 && obj.constructor === Object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment