빈 객체를 체크 하는 방법은 다음과 같다.

var obj = {};
Object.keys(obj).length === 0 && JSON.stringify(obj) === JSON.stringify({});

$.isEmptyObject(obj); // JQuery
[참고] http://stackoverflow.com/questions/679915/how-do-i-test-for-an-empty-javascript-object

+ Recent posts