mirror of
https://git.ddmt.top/ddmt/ddmt-tool.git
synced 2026-03-23 05:17:06 +00:00
1.0.2-beta.1
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user