Update Template

Signed-off-by: Tobias Berger <tobi.berger13@gmail.com>
This commit is contained in:
Tobias Berger 2020-12-16 12:02:17 +01:00
parent 90311622a9
commit e0fff4b4d5
Signed by: toby
GPG key ID: 2D05EFAB764D6A88
2 changed files with 6 additions and 2 deletions

View file

@ -1,7 +1,7 @@
import fs from "fs";
/**
* Main function for Puzzle A
* Main function for Part 1
*
* @param {string} data - Puzzle input as a single string.
*/
@ -10,6 +10,8 @@ async function main(data) {
}
fs.readFile("input", (err, data) => {
console.time("Part 1")
if (err) throw err;
main(data.toString()).then(console.log).catch(console.error);
console.timeEnd("Part 1")
});

View file

@ -1,7 +1,7 @@
import fs from "fs";
/**
* Main function for Puzzle B
* Main function for Part 2
*
* @param {string} data - Puzzle input as a single string.
*/
@ -10,6 +10,8 @@ async function main(data) {
}
fs.readFile("input", (err, data) => {
console.time("Part 2")
if (err) throw err;
main(data.toString()).then(console.log).catch(console.error);
console.timeEnd("Part 2")
});