UNPKG
foxts
Version:
latest (3.13.0)
next (3.13.0-beta.1)
3.13.0
3.13.0-beta.1
3.12.0
3.11.1
3.11.0
3.10.1
3.10.0
3.9.0
3.9.0-beta.1
3.8.0
3.7.0
3.6.0
3.5.0
3.4.0
3.3.4
3.3.3
3.3.2
3.3.1
3.3.0
3.2.0
3.1.1
3.1.0
3.0.1
3.0.0
2.0.1
1.7.0
1.6.0
1.5.1
1.5.0
1.4.0
1.3.1
1.3.0
1.2.0
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.13
1.0.12
1.0.11
1.0.10
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
0.0.0
Opinionated collection of common TypeScript utils by @SukkaW
github.com/SukkaW/foxts
foxts
/
dist
/
shuffle-array.js
2 lines
(1 loc)
•
220 B
JavaScript
View Raw
1
2
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};