random: toShuffled
Open
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 681
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
I thought a shuffle method would update an array in place.
**Describe the solution you'd like**
Two methods: `shuffle` and `toShuffled` (similar to built in methods `reverse` and `toReversed`, `sort` and `toSorted`, etc.): one for updating the array in place and the other for returning a new array.
**Describe alternatives you've considered**
Extracting the implementation and maintaining my own in-place shuffle method. That would not be ideal though.
Contributor guide
Assessment
This issue has not been assessed yet.