摘要:
list.forEach((item) => { const repeat = newArray.find((res) => res.name item.name); if (!repeat) { newArray.push({ name: item.name, ...item }); } else 阅读全文
摘要:
//判断当前对象属性是否都为空 const objectKeyIsEmpty = (obj) => { let empty = null; for (const key in obj) { if (obj.hasOwnProperty(key)) { if (obj[key] null || obj 阅读全文