allowJs is set to false in tsconfig.json now; please write all future code with typescript. cleanups: - removed platforms/deprecated - removed flow/history/old - see https://github.com/QURIresearch/metaforecast/issues/22 - commented some invalid axios options - minor fixes with mismatching function arguments - commented invalid mongo call in databaseReadWithReadCredentials - {encoding: 'utf-8'} in readFileSync calls
20 lines
379 B
TypeScript
20 lines
379 B
TypeScript
/* Imports */
|
|
import fs from 'fs';
|
|
|
|
/* Definitions */
|
|
let locationData = "./data/";
|
|
|
|
/* Body */
|
|
let rawdata = fs.readFileSync("../data/merged-questions.json", {
|
|
encoding: "utf-8",
|
|
});
|
|
let data = JSON.parse(rawdata);
|
|
|
|
let results = [];
|
|
for (let datum of data) {
|
|
// do something
|
|
}
|
|
|
|
let string = JSON.stringify(results, null, 2);
|
|
fs.writeFileSync("../data/output.txt", string);
|