The type of objects in the input array.
The type of the property used for sorting the input array.
The array to shuffle.
The property to use for sorting the array.
A Result
object with either the shuffled array, or an Error
object if the input is invalid.
Generated using TypeDoc v0.24.7
Shuffles an array of plain JavaScript objects by the specified property.
Remarks
This function creates a shallow copy of the input array and sorts the resulting array by the specified property.
Example
Shuffle an array of objects by the "name" property
Example
Handle an invalid input: