UNPKG

foxts

Version:

Opinionated collection of common TypeScript utils by @SukkaW

2 lines (1 loc) 220 B
Object.defineProperty(exports,"__esModule",{value:!0}),exports.shuffleArray=function(e,r={}){let t,{copy:o=!1,random:l=Math.random}=r,n=o?e.slice():e,f=0,s=n.length;for(;s;)f=l()*s--|0,t=n[s],n[s]=n[f],n[f]=t;return n};