/ Published in: JavaScript
Expand |
Embed | Plain Text
function isEmpty(obj) { if (typeof obj == 'undefined' || obj === null || obj === '') return true; if (typeof obj == 'number' && isNaN(obj)) return true; if (obj instanceof Date && isNaN(Number(obj))) return true; return false; }
You need to login to post a comment.
