Merge branch 'staging' into fix/transfer-advanced-bonfires
This commit is contained in:
@ -104,7 +104,7 @@
|
|||||||
"assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]).sort(), [1, 4, 5], 'message: <code>sym([1, 2, 5], [2, 3, 5], [3, 4, 5])</code> should return <code>[1, 4, 5]</code>');",
|
"assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]).sort(), [1, 4, 5], 'message: <code>sym([1, 2, 5], [2, 3, 5], [3, 4, 5])</code> should return <code>[1, 4, 5]</code>');",
|
||||||
"assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]).sort(), [1, 4, 5], 'message: <code>sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5])</code> should return <code>[1, 4, 5]</code>.');",
|
"assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]).sort(), [1, 4, 5], 'message: <code>sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5])</code> should return <code>[1, 4, 5]</code>.');",
|
||||||
"assert.deepEqual(sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3]).sort(), [2, 3, 4, 6, 7], 'message: <code>sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3])</code> should return <code>[7, 4, 6, 2, 3]</code>.');",
|
"assert.deepEqual(sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3]).sort(), [2, 3, 4, 6, 7], 'message: <code>sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3])</code> should return <code>[7, 4, 6, 2, 3]</code>.');",
|
||||||
"assert.deepEqual(sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1]).sort(), [1, 2, 4, 5, 6, 7, 8, 9], 'message: <code>sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1])</code> should return <code>[1, 2, 5, 6, 7, 8, 9]</code>')"
|
"assert.deepEqual(sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1]).sort(), [1, 2, 4, 5, 6, 7, 8, 9], 'message: <code>sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1])</code> should return <code>[1, 2, 4, 5, 6, 7, 8, 9]</code>')"
|
||||||
],
|
],
|
||||||
"MDNlinks": [
|
"MDNlinks": [
|
||||||
"Array.reduce()",
|
"Array.reduce()",
|
||||||
|
@ -576,7 +576,7 @@
|
|||||||
""
|
""
|
||||||
],
|
],
|
||||||
"tail": [
|
"tail": [
|
||||||
"(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = '\" + c + \"'\"; })(a,b,c);"
|
"(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = \" + c; })(a,b,c);"
|
||||||
],
|
],
|
||||||
"solutions": [
|
"solutions": [
|
||||||
"var a = 3;\nvar b = 17;\nvar c = 12;\n\na += 12;\nb += 9;\nc += 7;"
|
"var a = 3;\nvar b = 17;\nvar c = 12;\n\na += 12;\nb += 9;\nc += 7;"
|
||||||
@ -617,7 +617,7 @@
|
|||||||
""
|
""
|
||||||
],
|
],
|
||||||
"tail": [
|
"tail": [
|
||||||
"(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = '\" + c + \"'\"; })(a,b,c);"
|
"(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = \" + c; })(a,b,c);"
|
||||||
],
|
],
|
||||||
"solutions": [
|
"solutions": [
|
||||||
"var a = 11;\nvar b = 9;\nvar c = 3;\n\na -= 6;\nb -= 15;\nc -= 1;\n\n"
|
"var a = 11;\nvar b = 9;\nvar c = 3;\n\na -= 6;\nb -= 15;\nc -= 1;\n\n"
|
||||||
@ -658,7 +658,7 @@
|
|||||||
""
|
""
|
||||||
],
|
],
|
||||||
"tail": [
|
"tail": [
|
||||||
"(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = '\" + c + \"'\"; })(a,b,c);"
|
"(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = \" + c; })(a,b,c);"
|
||||||
],
|
],
|
||||||
"solutions": [
|
"solutions": [
|
||||||
"var a = 5;\nvar b = 12;\nvar c = 4.6;\n\na *= 5;\nb *= 3;\nc *= 10;"
|
"var a = 5;\nvar b = 12;\nvar c = 4.6;\n\na *= 5;\nb *= 3;\nc *= 10;"
|
||||||
@ -2688,7 +2688,7 @@
|
|||||||
"function myTest(val) {\n if(val < 5) {\n return \"Less than 5\"; \n } else if (val < 10) {\n return \"Less than 10\";\n } else {\n return \"Greater than or equal to 10\";\n }\n}"
|
"function myTest(val) {\n if(val < 5) {\n return \"Less than 5\"; \n } else if (val < 10) {\n return \"Less than 10\";\n } else {\n return \"Greater than or equal to 10\";\n }\n}"
|
||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert(myTest(4) === \"Less than 5\", 'message: <code>myTest(5)</code> should return \"Less than 5\"');",
|
"assert(myTest(4) === \"Less than 5\", 'message: <code>myTest(4)</code> should return \"Less than 5\"');",
|
||||||
"assert(myTest(6) === \"Less than 10\", 'message: <code>myTest(6)</code> should return \"Less than 10\"');",
|
"assert(myTest(6) === \"Less than 10\", 'message: <code>myTest(6)</code> should return \"Less than 10\"');",
|
||||||
"assert(myTest(11) === \"Greater than or equal to 10\", 'message: <code>myTest(11)</code> should return \"Greater than or equal to 10\"');"
|
"assert(myTest(11) === \"Greater than or equal to 10\", 'message: <code>myTest(11)</code> should return \"Greater than or equal to 10\"');"
|
||||||
],
|
],
|
||||||
|
@ -502,7 +502,7 @@
|
|||||||
"assert($(\"p\").length > 1, 'message: You need 2 <code>p</code> elements with Kitty Ipsum text.');",
|
"assert($(\"p\").length > 1, 'message: You need 2 <code>p</code> elements with Kitty Ipsum text.');",
|
||||||
"assert(code.match(/<\\/p>/g) && code.match(/<\\/p>/g).length === code.match(/<p/g).length, 'message: Make sure each of your <code>p</code> elements has a closing tag.');",
|
"assert(code.match(/<\\/p>/g) && code.match(/<\\/p>/g).length === code.match(/<p/g).length, 'message: Make sure each of your <code>p</code> elements has a closing tag.');",
|
||||||
"assert.isTrue((/Purr\\s+jump\\s+eat/gi).test($(\"p\").text()), 'message: Your <code>p</code> element should contain the first few words of the provided additional <code>kitty ipsum text</code>.');",
|
"assert.isTrue((/Purr\\s+jump\\s+eat/gi).test($(\"p\").text()), 'message: Your <code>p</code> element should contain the first few words of the provided additional <code>kitty ipsum text</code>.');",
|
||||||
"assert($(\"p:eq(0)\").css(\"font-size\") === \"16px\" && $(\"p:eq(1)\").css(\"font-size\") === \"16px\", 'message: Give elements with the <code>p</code> tag a <code>font-size</code> of <code>16px</code>.')"
|
"assert(Number.parseInt($(\"p:eq(0)\").css(\"font-size\"), 10) > 15 && Number.parseInt($(\"p:eq(1)\").css(\"font-size\"), 10) > 15, 'message: Give elements with the <code>p</code> tag a <code>font-size</code> of <code>16px</code>.')"
|
||||||
],
|
],
|
||||||
"type": "waypoint",
|
"type": "waypoint",
|
||||||
"challengeType": 0,
|
"challengeType": 0,
|
||||||
@ -1820,7 +1820,7 @@
|
|||||||
"tests": [
|
"tests": [
|
||||||
"assert($(\"form\").children(\"button\").length > 0, 'message: Your form should have a button inside it.');",
|
"assert($(\"form\").children(\"button\").length > 0, 'message: Your form should have a button inside it.');",
|
||||||
"assert($(\"button\").attr(\"type\") === \"submit\", 'message: Your submit button should have the attribute <code>type</code> set to <code>submit</code>.');",
|
"assert($(\"button\").attr(\"type\") === \"submit\", 'message: Your submit button should have the attribute <code>type</code> set to <code>submit</code>.');",
|
||||||
"assert($(\"button\").text().match(/submit/gi), 'message: Your submit button should have the text \"submit\".');",
|
"assert($(\"button\").text().match(/submit/gi), 'message: Your submit button should have the text \"Submit\".');",
|
||||||
"assert(code.match(/<\\/button>/g) && code.match(/<button/g) && code.match(/<\\/button>/g).length === code.match(/<button/g).length, 'message: Make sure your <code>button</code> element has a closing tag.');"
|
"assert(code.match(/<\\/button>/g) && code.match(/<button/g) && code.match(/<\\/button>/g).length === code.match(/<button/g).length, 'message: Make sure your <code>button</code> element has a closing tag.');"
|
||||||
],
|
],
|
||||||
"type": "waypoint",
|
"type": "waypoint",
|
||||||
|
@ -17,6 +17,8 @@ MongoClient.connect(secrets.db, function(err, database) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
var firstTime = true;
|
||||||
|
|
||||||
var stream = database.collection('user')
|
var stream = database.collection('user')
|
||||||
.find({'completedChallenges': { $ne: null },
|
.find({'completedChallenges': { $ne: null },
|
||||||
'isLocked': { $ne: true } },
|
'isLocked': { $ne: true } },
|
||||||
@ -36,7 +38,12 @@ MongoClient.connect(secrets.db, function(err, database) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
if (dataOut.length) {
|
if (dataOut.length) {
|
||||||
console.log(JSON.stringify(dataOut) + ',');
|
if (!firstTime) {
|
||||||
|
console.log(',' + JSON.stringify(dataOut));
|
||||||
|
} else {
|
||||||
|
firstTime = false;
|
||||||
|
console.log(JSON.stringify(dataOut));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).on('end', function() {
|
}).on('end', function() {
|
||||||
|
Reference in New Issue
Block a user