
// The package "stream-transform" must be installed:   
// `npm install stream-transform`

var fs = require('fs');
var parse = require('..');
var transform = require('stream-transform');

var parser = parse({delimiter: ':'})
var input = fs.createReadStream('/etc/passwd');
var transformer = transform(function(record, callback){
  setTimeout(function(){
    callback(null, record.join(' ')+'\n');
  }, 500);
}, {parallel: 10});
input.pipe(parser).pipe(transformer).pipe(process.stdout);

