How to Determine Whether a JavaScript Object Is Empty
Too Long; Didn't Read
Defining a new object in Javascript is pretty easy - but what if you want to find out if it's empty? For example, {} is an empty object, but how do we actually test that this is the case?
The easiest (and best) way to do this, is to use Object.keys().