pipe many streams to this transform stream and output the data in order.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
LICENSE
README.md
index.js
package.json

README.md

mergesort-stream

Merge multiple sorted streams into one sorted stream. Each stream itself must be sorted.

var mergestream = require('mergesort-stream')

var toMerge = [stream1,stream2,stream3,...]

mergestream(function(value1,value2){
  // compare values just like [].sort
  if(value1 > value2) return 1
  else if(value1 < value2) return -1
  return 0
},toMerge)