SOURCE

let obj = {};
if(JSON.stringify(obj) === "{}"){
    console.log("空对象")
}else{
    console.log(obj)
}

console.log(Object.keys(obj))
if(Object.keys(obj) == []){
    console.log(obj)
}else{
    console.log("空对象");
}
console 命令行工具 X clear

                    
>
console