UNPKG
@leofavre/memory-game-component
Version:
latest (1.3.1)
1.3.1
1.3.0
1.2.3
1.2.2
1.2.1
1.2.0
1.1.0
1.0.0
A memory game web component.
@leofavre/memory-game-component
/
dist
/
cjs
/
es6
/
helpers
/
shuffle.js
13 lines
(10 loc)
•
262 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
, {
value
:
true
});
exports
.
default
=
void
0
;
var
_default
= arr => arr.
map
(
a
=>
({
sort
:
Math
.
random
(),
value
: a })).
sort
(
(
a, b
) =>
a.
sort
- b.
sort
).
map
(
a
=>
a.
value
);
exports
.
default
= _default;