Shouldn't enc in the below example be 'utf8'? In node 0.10.26 it's buffer:
var fs = require('fs');
var through2 = require('through2');
fs.createReadStream('./file.json', { encoding: 'utf8' })
.pipe(through2(function(chunk, enc, cb) {
console.log('chunk', chunk, 'enc', enc);
this.push(chunk);
cb();
}))
Is it expected that transforms are doing string conversions? Am I doing something wrong?
Shouldn't
encin the below example be 'utf8'? In node 0.10.26 it'sbuffer:Is it expected that transforms are doing string conversions? Am I doing something wrong?