export default function isObjectEmpty(obj) {
    if (Object.keys) {
        return (Object.keys(obj).length === 0);
    } else {
        var k;
        for (k in obj) {
            // even if its not own property I'd still call it non-empty
            return false;
        }
        return true;
    }
}

export default function isObjectEmpty(obj) {
    if (Object.getOwnPropertyNames) {
        return (Object.getOwnPropertyNames(obj).length === 0);
    } else {
        var k;
        for (k in obj) {
            if (obj.hasOwnProperty(k)) {
                return false;
            }
        }
        return true;
    }
}

Use getOwnPropertyNames to check for empty object.
Use getOwnPropertyNames to check for empty object.

Added hasOwnProperty check to for..in loop.
