0x0049 icon

Advent of Code | Day 8 | Part 2

0x0049 | PRO | 12/08/15 08:31:34 PM UTC | 0 ⭐ | 205 👁️ | Never ⏰ | []
JavaScript |

300 B

|

None

|

0 👍

/

0 👎

var encoded = 0, file = process.argv[2] ? process.argv[2] : 'day8_input';
require('readline').createInterface({
    input: require('fs').createReadStream(file)
})
.on('line', function (line) {
    encoded += 2 + (line.match(/\"|\\/g) || []).length;
})
.on('close', function () {
    console.log(encoded);
});

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎