//判斷對象是否爲空ide
//console.log(isEmptyObject()); //true spa
//console.log(isEmptyObject({})); //true orm
//console.log(isEmptyObject(null)); //true 對象
//console.log(isEmptyObject(23)); //true 字符串
//console.log(isEmptyObject({"te": 2})); //false it
function isEmptyObject(e) { io
var t; console
for (t in e){function
return !1; class
}
return !0
}
//判斷字符串是否爲空
function isEmptyStr(str){
if(str == null || str == 'null' || str == undefined || str == 'undefined' || str.match(/^[\s]*$/)){
return true;
}else{
return false;
}
}