var Batcher = require('byte-stream')
var manualMergeStream = require('manual-merge-stream')
var diff2daff = require('diff2daff')

module.exports = function (diffStream, opts, merge) {
  if (!opts) {
    opts = {}
  }
  var limit = (opts.limit || 20) * 2
  var batchStream = Batcher(limit)
  var opts = {
    vizFn:  opts.vizFn || diff2daff,
    merge: merge
  }

  return diffStream.pipe(batchStream).pipe(manualMergeStream(opts))
}
var Batcher = require('byte-stream')
var manualMergeStream = require('manual-merge-stream')
var diff2daff = require('diff2daff')

module.exports = function (diffStream, opts, merge) {
  if (!opts) {
    opts = {}
  }
  var limit = (opts.limit || 20) * 2
  var batchStream = Batcher(limit)
  var vizFn = opts.vizFn || diff2daff

  var mergeStream
  if (merge) mergeStream = manualMergeStream(vizFn, merge)
  else mergeStream = manualMergeStream(vizFn)

  return diffStream.pipe(batchStream).pipe(mergeStream)
}
--- 
+++ 
@@ -8,10 +8,11 @@
   }
   var limit = (opts.limit || 20) * 2
   var batchStream = Batcher(limit)
-  var opts = {
-    vizFn:  opts.vizFn || diff2daff,
-    merge: merge
-  }
+  var vizFn = opts.vizFn || diff2daff
 
-  return diffStream.pipe(batchStream).pipe(manualMergeStream(opts))
+  var mergeStream
+  if (merge) mergeStream = manualMergeStream(vizFn, merge)
+  else mergeStream = manualMergeStream(vizFn)
+
+  return diffStream.pipe(batchStream).pipe(mergeStream)
 }
Use new manual-merge-stream vizFn opts
