const isNullOrEmpty = (val) => { if(val === '' || val === 0 || val === null || typeof(val) === 'undefined') { return true; } else { if (typeof(val) === 'object' && (Object.keys(val).length === 0)) { return true; } return false; } }
判断字符串是否为空
最新推荐文章于 2023-08-02 18:03:51 发布