UNPKG

@techmely/utils

Version:

Collection of helpful JavaScript / TypeScript utils

15 lines (11 loc) 308 B
/*! * @techmely/utils * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com> * MIT Licensed */ // src/findDuplicates.ts function findDuplicates(items) { const filtered = items.filter((el, index) => items.indexOf(el) !== index); return [...new Set(filtered)]; } export { findDuplicates };