(arr, seed = Date.now())
| 14190 | return parts.join("/") |
| 14191 | } |
| 14192 | static shuffleInPlace(arr, seed = Date.now()) { |
| 14193 | // https://stackoverflow.com/questions/6274339/how-can-i-shuffle-an-array |
| 14194 | const randFn = Utils._getPseudoRandom0to1FloatGenerator(seed) |
| 14195 | for (let index = arr.length - 1; index > 0; index--) { |
| 14196 | const tempIndex = Math.floor(randFn() * (index + 1)) |
| 14197 | ;[arr[index], arr[tempIndex]] = [arr[tempIndex], arr[index]] |
| 14198 | } |
| 14199 | return arr |
| 14200 | } |
| 14201 | // Only allows a-zA-Z0-9-_ (And optionally .) |
| 14202 | static _permalink(str, reg) { |
| 14203 | return str.length ? str.toLowerCase().replace(reg, "").replace(/ /g, "-") : "" |
nothing calls this directly
no test coverage detected