list module

This commit is contained in:
DIYgod
2018-03-20 16:55:59 +08:00
parent 5c9456b650
commit 7afe441da1
6 changed files with 184 additions and 150 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ const utils = {
/**
* get random order, using Fisher–Yates shuffle
*/
randomOrder: (length = this.options.audio.length) => {
randomOrder: (length) => {
function shuffle (arr) {
for (let i = arr.length - 1; i >= 0; i--) {
const randomIndex = Math.floor(Math.random() * (i + 1));