import * as fs from "fs"; import * as readline from "readline"; export async function LoadInput(dayNumber: number): Promise { const contents = []; const stream = fs.createReadStream(`./inputs/${dayNumber}.txt`, "utf8"); const rl = readline.createInterface({ input: stream, crlfDelay: Infinity, }); for await (const line of rl) { contents.push(line); } return contents; }