aboutsummaryrefslogtreecommitdiffstats
path: root/src/helpers/array-helpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers/array-helpers.js')
-rw-r--r--src/helpers/array-helpers.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/helpers/array-helpers.js b/src/helpers/array-helpers.js
new file mode 100644
index 000000000..ffb3b63dc
--- /dev/null
+++ b/src/helpers/array-helpers.js
@@ -0,0 +1,4 @@
1export const shuffleArray = arr => arr
2 .map(a => [Math.random(), a])
3 .sort((a, b) => a[0] - b[0])
4 .map(a => a[1]);