mxs
Version:
⚔️ Lightweight functional JavaScript utilities
15 lines (14 loc) • 446 B
TypeScript
/**
*
* Remove duplicated items from an array
*
* @category Function
* @param {string | Array} key - Object key to compare and remove it from the original array or an Array that will be removed duplicated items
* @param {Array} arr - An array
* @returns {Array} - New array without the duplicated items
*/
export declare const uniq: <T>(key: string | T[]) => T[] | ((arr: {
[key: string]: any;
}[]) => {
[key: string]: any;
}[]);