diff --git a/server/boot/challenge.js b/server/boot/challenge.js index 4a6aeeecf4..a4d057f13b 100644 --- a/server/boot/challenge.js +++ b/server/boot/challenge.js @@ -35,12 +35,14 @@ const dasherize = utils.dasherize; const unDasherize = utils.unDasherize; const getMDNLinks = utils.getMDNLinks; +/* function makeChallengesUnique(challengeArr) { // clone and reverse challenges // then filter by unique id's // then reverse again return _.uniq(challengeArr.slice().reverse(), 'id').reverse(); } +*/ function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); } @@ -556,7 +558,7 @@ module.exports = function(app) { dashedName: dasherize(blockArray[0].block), challenges: blockArray, completed: completedCount / blockArray.length * 100, - time: blockArray[0] && blockArray[0].time || "???" + time: blockArray[0] && blockArray[0].time || '???' }; }) .filter(({ name }) => name !== 'Hikes') @@ -579,7 +581,9 @@ module.exports = function(app) { res.render('challengeMap/show', { blocks, daysRunning, - globalCompletedCount: numberWithCommas(5612952 + (Math.floor((Date.now() - 1446268581061) / 3000))), + globalCompletedCount: numberWithCommas( + 5612952 + (Math.floor((Date.now() - 1446268581061) / 3000)) + ), camperCount, lastCompleted, title: "A map of all Free Code Camp's Challenges"