var fs = require('fs') // WORKS! Outputs file line by line. | |
var liner = require('./liner') | |
var source = fs.createReadStream('./hhh.in') | |
source.pipe(liner) | |
// var testcases, matrix_size | |
liner.on('readable', function () { | |
var line; | |
// var testcases = liner.read(); | |
console.log(liner.read()); | |
while (line = liner.read()) { | |
console.log(line); | |
} | |
}) | |
var fs = require('fs') // Doesn't work. The act of storing in var destroys everything? | |
var liner = require('./liner') | |
var source = fs.createReadStream('./hhh.in') | |
source.pipe(liner) | |
// var testcases, matrix_size | |
liner.on('readable', function () { | |
var line; | |
var testcases = liner.read(); | |
// console.log(liner.read()); | |
while (line = liner.read()) { | |
console.log(line); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment