You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
332 B
10 lines
332 B
|
4 months ago
|
/**
|
||
|
|
* <zh/> 数组去重
|
||
|
|
*
|
||
|
|
* <en/> deduplicate array
|
||
|
|
* @param arr - <zh/> 数组 | <en/> array
|
||
|
|
* @param by - <zh/> 通过某个属性去重 | <en/> deduplicate by some property
|
||
|
|
* @returns <zh/> 去重后的数组 | <en/> deduplicated array
|
||
|
|
*/
|
||
|
|
export declare function deduplicate<T>(arr: T[], by?: (item: T) => unknown): T[];
|