UNPKG

aoc-automation

Version:

Advent of Code tool to automate the repetitive parts of AoC.

16 lines (15 loc) 354 B
import fs from "fs"; import path from "path"; const readConfig = () => { return JSON.parse( fs.readFileSync(path.join("src", ".aoc-data.json")).toString() ); }; const saveConfig = (config) => { const data = JSON.stringify(config, null, 2); fs.writeFileSync(path.join("src", ".aoc-data.json"), data); }; export { readConfig, saveConfig };