1.0.2-beta.1

This commit is contained in:
2024-10-17 17:27:58 +08:00
parent d368a82e7c
commit 45d1530f15
4 changed files with 15 additions and 15 deletions

View File

@@ -30,6 +30,19 @@ export function nextArray(arr, index) {
return arr.slice(index + 1, arr.length).concat(arr.slice(0, index + 1));
}
/*
* 数组去重函数
* @param {Array} arr
*/
export function ArrayDeHeavy(arr) {
let newArr = new Set();
arr.forEach(item => {
newArr.add(item);
});
return Array.from(newArr);
}
/*
* 获取相对时间(中文)
* @param {Date} date