Skip to content

Commit 37bda76

Browse files
Merge pull request #3 from amclin/feature/2018-day-13
Feature/2018 day 13
2 parents 064a743 + 375135b commit 37bda76

File tree

5 files changed

+589
-0
lines changed

5 files changed

+589
-0
lines changed

2018/day-13/helpers.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const fs = require('fs')
2+
const path = require('path')
3+
const filePath = path.join(__dirname, 'input.txt')
4+
5+
const loadInput = (callback) => {
6+
fs.readFile(filePath, { encoding: 'utf8' }, (err, data) => {
7+
if (err) throw err
8+
9+
if (typeof callback === 'function') {
10+
callback(data)
11+
}
12+
})
13+
}
14+
15+
module.exports = {
16+
loadInput
17+
}

0 commit comments

Comments
 (0)