I'm trying to create a stream to read file contents using fs.readFile. In BaconJS, I can achieve this by -
var readStream = Bacon.fromNodeCallback(fs.readFile, 'somefile.txt');
readStream.onValue(function (data) {
//do something with data
});
I have checked API and specs but I see Kefir.fromNodeCallback only accepts single function as argument. Am I missing something obvious? How can I achieve this in Kefir?
I'm trying to create a stream to read file contents using fs.readFile. In BaconJS, I can achieve this by -
I have checked API and specs but I see Kefir.fromNodeCallback only accepts single function as argument. Am I missing something obvious? How can I achieve this in Kefir?