advent-of-code

Entries to advent of code, multiple years
git clone git://git.finwo.net/misc/advent-of-code
Log | Files | Refs

char-for-char.js (214B)


      1 const through = require('through2');
      2 
      3 module.exports = () => through(function(chunk, enc, cb) {
      4   chunk = chunk.toString();
      5   for(let i = 0; i < chunk.length; i++) {
      6     this.push(chunk.charAt(i));
      7   }
      8   cb();
      9 });