UNPKG

node-mirai-fgo-gacha

Version:

node-mirai-sdk fgo gacha plugin

10 lines (8 loc) 201 B
const shuffle = a => { for (let i = a.length - 1; i > 0; i --) { const j = Math.floor(Math.random() * (i + 1)); [a[i], a[j]] = [a[j], a[i]]; } return a; }; module.exports = shuffle;