lib/proxyStream.js
function proxyStream(err, stats) {
    return through.obj(function(chunk, enc, cb) {
        processStats.call(this, chunk, stats);

        if (_.isError(err)) {
            this.emit('error', wrapError(err));
        }

        cb(null, chunk);
    });
}
function proxyStream(err, stats) {
    return through.obj(function(chunk, enc, cb) {
        processStats.call(this, chunk, stats);

        if (_.isError(err)) {
            this.emit('error', wrapError(err));
        }

        cb(null, chunk);
    });
}
function proxyStream ( err , stats ) { return through . obj ( function ( chunk , enc , cb ) { processStats . call ( this , chunk , stats ) ; if ( _ . isError ( err ) ) { this . emit ( 'error' , wrapError ( err ) ) ; } cb ( null , chunk ) ; } ) ; }
Re-uses existing `err` and `stats` objects. Can be piped.
@function
@alias proxyStream
@param {Error=} err
@param {Stats=} stats
@returns {Stream}
Re - uses existing err and stats objects . Can be piped .