Node readline module doesn't have 'on' function?
I'm trying to create a node app that reads a textfile line by line using the 'readline' module, and prints it to the console. var lineReader = require('readline'); lineReader.createInterface({ input: fs.createReadStream('./testfile') }); lineReader.on('line', function(line){ console.log(line); }); According to the module's documentation, there should be an 'on' method . However when I log the instance of the readline object I created, I don't see an 'on' method anywhere: { createInterface: [Function], Interface: { [Function: Interface] super_: { [Function: EventEmitter] EventEmitter: [Circular