Closed thom4parisot closed 8 years ago
The idea would be to be able to process a buffer stream:
var slayer = require('slayer'); var byline = require('byline'); var fs = require('fs'); var analyser = slayer() .y(slayer.buffer.nthColumn(5, ' ')) // 5th column, separated by a space character .on('spike', function(spike){ console.log(spike); // { x: 4, y: 12 } }); fs.createReadStream('./data.txt') .pipe(byline.LineStream) .pipe(analyser.fromStream()) .pipe(process.stdout);
The idea would be to be able to process a buffer stream: