Say I have an array like this: [1, 1, 2, 2, 3]
[1, 1, 2, 2, 3]
I want to get the duplicates which are in this case: [1, 2]
[1, 2]
Does lodash support thi
pure js solution
export function hasDuplicates(array) { return new Set(array).size !== array.length }