dupes-of-hazard
Version:
Get a set of duplicates from an array.
14 lines (9 loc) • 355 B
Markdown
# dupes-of-hazard
<img src="https://media.tenor.com/jjuP1FaScjcAAAAd/general-lee-dukes-of-hazzard.gif" alt="Dukes of Hazard" width="300"/>
Given an array of values, return all the values that are duplicated.
```typescript
import { getDupes } from 'dupes-of-hazard'
const arr = [['id'], ['foo'], ['id'], ['bar']]
getDupes(arr)
// new Set([['id']])
```