Added rudimentary Trivia game.
This commit is contained in:
18
assets/curate-jeopardy.js
Normal file
18
assets/curate-jeopardy.js
Normal file
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs').promises;
|
||||
|
||||
const questions = require('./jeopardy_raw.json');
|
||||
|
||||
async function init() {
|
||||
const curatedQuestions = questions.map((question) => ({
|
||||
...question,
|
||||
question: question.question.replace(/^'|'$/g, ''),
|
||||
}));
|
||||
|
||||
await fs.writeFile('assets/jeopardy.json', JSON.stringify(curatedQuestions));
|
||||
|
||||
console.log(curatedQuestions);
|
||||
}
|
||||
|
||||
init();
|
||||
1
assets/jeopardy.json
Normal file
1
assets/jeopardy.json
Normal file
File diff suppressed because one or more lines are too long
1
assets/jeopardy_raw.json
Executable file
1
assets/jeopardy_raw.json
Executable file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user