()
| 46 | function readInput(cb, filename) { |
| 47 | |
| 48 | function readFile() { |
| 49 | fs.readFile(filename, 'utf8', function (err, text) { |
| 50 | if (err) { |
| 51 | console.error("[ERROR] couldn't read from '" + filename + "':"); |
| 52 | console.error(err.message); |
| 53 | return; |
| 54 | } |
| 55 | |
| 56 | cb(err, text); |
| 57 | }); |
| 58 | } |
| 59 | |
| 60 | function readStdin() { |
| 61 | var text = '' |