export const isDuplicated = (array?: T[]) => { if (!array) return false; return array.length > new Set(array).size; };