mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-25 06:49:15 +01: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' }