Skip to content

Instantly share code, notes, and snippets.

@sillyslux
sillyslux / map.js
Last active May 1, 2020 14:34 — forked from Franckapik/map.js
let playersList = {};
listeId.map((ident, i) => {
playersList[ident] = {
score : 0,
x : 0,
y : 0
}
})
const playersList = listeId.reduce( (p, c) => ({ ...p, [c]: { score: 0, x: 0 , y:0 } }), {});
@sillyslux
sillyslux / asybn.js
Last active January 25, 2018 10:59 — forked from theSekyi/asybn.js
const getOldNavDaily = oldNavUrl => fetch(oldNavUrl)
.then(resp => resp.json())
.then(data => data.payload.nav);
getOldNavDaily('//example.com/getOldNavDaily.php').then(console.log);