Assuming I declare
var ad = {};
How can I check whether this object will contain any user-defined properties?
Very late answer, but this is how you could handle it with prototypes.
Array.prototype.Any = function(func) { return this.some(func || function(x) { return x }); } Object.prototype.IsAny = function() { return Object.keys(this).Any(); }