Remove duplicate shuffle function
This commit is contained in:
parent
8401a10127
commit
ccb0996187
1 changed files with 0 additions and 12 deletions
|
@ -28,18 +28,6 @@ utils.common = {
|
||||||
quote: function (obj) {
|
quote: function (obj) {
|
||||||
return JSON.stringify(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) {
|
uniqueList: function (list) {
|
||||||
let tmp = {}
|
let tmp = {}
|
||||||
let r = []
|
let r = []
|
||||||
|
|
Loading…
Reference in a new issue