Remove duplicate shuffle function

This commit is contained in:
pyoor 2017-06-08 09:32:40 -04:00
parent 8401a10127
commit ccb0996187

View file

@ -28,18 +28,6 @@ utils.common = {
quote: function (obj) {
return JSON.stringify(obj)
},
shuffle: function (list) {
let newArray = list.slice()
let len = newArray.length
let i = len
while (i--) {
let p = parseInt(Math.random() * len)
let t = newArray[i]
newArray[i] = newArray[p]
newArray[p] = t
}
return newArray
},
uniqueList: function (list) {
let tmp = {}
let r = []