/**
 * 获取数据差异
 *
 * @param {any[]} arr1 数组
 * @param {any[]} arr2 数组
 */
const diff = function (arr1, arr2) {
  arr1 = Array.from(new Set(arr1))
  arr2 = Array.from(new Set(arr2))
  const mergeArr = arr1.concat(arr2)
  return mergeArr.filter(x => !(arr1.includes(x) && arr2.includes(x)))
}

export { diff }
