diff options
Diffstat (limited to 'src/helpers/array-helpers.ts')
-rw-r--r-- | src/helpers/array-helpers.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/helpers/array-helpers.ts b/src/helpers/array-helpers.ts index ae5d8d99f..3f8806176 100644 --- a/src/helpers/array-helpers.ts +++ b/src/helpers/array-helpers.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | export const shuffleArray = (arr: any[]) => arr | 1 | export const shuffleArray = (arr: any[]) => |
2 | .map((a) => [Math.random(), a]) | 2 | arr |
3 | .sort((a, b) => a[0] - b[0]) | 3 | .map(a => [Math.random(), a]) |
4 | .map((a) => a[1]); | 4 | .sort((a, b) => a[0] - b[0]) |
5 | .map(a => a[1]); | ||