import { isEmpty } from './isEmpty';

/**
 * 删除对象中为空的属性值 返回一个新对象
 * @param data - 原始对象
 **/
export const delEmptyObjkey = function (data: any) {
  const obj = {} as any;
  for (const key in data) {
    if (!isEmpty(data[key])) {
      obj[key] = data[key];
    }
  }
  return obj;
};
