on master help sign in
*
commitfda69d5fe0c0b61cc2427cf6ae4af857cc0b1b4a authorDevine Lu Linvega <aliceffekt@gmail.com> dateTue 2 Jul 2019, 10:11 (7 years ago) parentedbec08
1 file changed+8−8
scripts/hallway.js+8−8
scripts/hallway.js+8−8
@@ -27,14 +27,14 @@ function Hallway (sites) {
2727
2828 // Entries
2929
30− function compare( a, b ) {
31− if ( a.date < b.date ){
32− return -1;
30+ function compare (a, b) {
31+ if (a.date < b.date) {
32+ return -1
3333 }
34− if ( a.date > b.date ){
35− return 1;
34+ if (a.date > b.date) {
35+ return 1
3636 }
37− return 0;
37+ return 0
3838 }
3939
4040 this.sortEntries = function () {
@@ -46,7 +46,7 @@ function Hallway (sites) {
4646 a.push(entry)
4747 }
4848 }
49− return a.sort( compare );
49+ return a.sort(compare)
5050 }
5151
5252 this.templateEntry = function (entry) {
@@ -103,7 +103,7 @@ function Hallway (sites) {
103103 const entries = []
104104 for (const id in lines) {
105105 const line = lines[id].trim()
106− if(line === ''){ continue }
106+ if (line === '') { continue }
107107 const date = line.substr(0, 25).trim()
108108 const body = line.substr(26).trim()
109109 entries.push({ date, body, author })