@yantrix/functions v0.0.2 • Docs
Yantrix API / @yantrix/functions / Transformers / shuffle
Function: shuffle()
shuffle(str)
ts
function shuffle(str): string
Shuffles the characters of a string.
Parameters
• str: string
The string to shuffle.
Returns
string
A new string with the characters shuffled.
shuffle(list)
ts
function shuffle<T>(list): T[]
Shuffles the elements of an array.
Type Parameters
• T
The type of the elements in the array.
Parameters
• list: T
[]
The array to shuffle.
Returns
T
[]
A new array with the elements shuffled.