mirror of
https://github.com/cp6/my-idlers.git
synced 2025-04-21 02:28:35 +00:00
353 B
353 B
duplicates()
The duplicates method retrieves and returns duplicate values from the collection:
const collection = collect(['a', 'b', 'a', 'c', 'b']);
const duplicates = collection.duplicates();
duplicates.all();
// { 2: 'a', 4: 'b' }