/works and doesnt Secret
Last active
September 9, 2015 18:39
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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