UNPKG
jocly
Version:
latest (0.9.13)
0.9.13
0.9.12
0.9.11
0.9.10
0.9.9
0.9.8
0.9.7
0.9.6
0.9.5
0.9.4
0.9.3
0.9.2
0.9.1
Board games 3D/2D UI and AI web library
github.com/mi-g/jocly
mi-g/jocly
jocly
/
examples
/
node
/
list-games.js
12 lines
(8 loc)
•
291 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
var
jocly =
require
(
"../.."
); jocly.
listGames
() .
then
(
(
games
)=>
{
var
gameNames =
Object
.
keys
(games).
map
(
(
gameName
) =>
{
return
games[gameName].
title
; }); process.
stdout
.
write
(
Object
.
keys
(games).
length
+
" games: "
+gameNames.
join
(
", "
)+
"\n"
); });