ignore last empty line, a bit stupid to include in each assignment
This commit is contained in:
parent
4f8b77beb7
commit
a66110f9b9
|
@ -0,0 +1,2 @@
|
|||
*.bin
|
||||
*.sublime-workspace
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
module.exports.solve = function(input) {
|
||||
return input.split('\n')
|
||||
.filter(line => line.length > 1)
|
||||
.map(line => {
|
||||
const nrs = line.replace(/[^0-9.]/g, '')
|
||||
return parseInt(nrs[0] + nrs[nrs.length - 1])
|
||||
|
|
|
@ -29,7 +29,6 @@ module.exports.solve = function(input, bagConfig) {
|
|||
}
|
||||
|
||||
return input.split('\n')
|
||||
.filter(line => line.length > 1)
|
||||
.map(parseGame)
|
||||
.filter(isGamePossible)
|
||||
.map(game => game.id)
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"folders":
|
||||
[
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue