Assuming I declare
var ad = {};
How can I check whether this object will contain any user-defined properties?
Late answer, but some frameworks handle objects as enumerables. Therefore, bob.js can do it like this:
var objToTest = {}; var propertyCount = bob.collections.extend(objToTest).count();