1var union = require('./') 2var from = require('from2') 3 4var sorted1 = from.obj([{key: 'a'}, {key: 'b'}, {key: 'c'}]) 5var sorted2 = from.obj([{key: 'b'}, {key: 'd'}]) 6 7var u = union(sorted1, sorted2) 8 9u.on('data', function (data) { 10 console.log(data) 11}) 12 13u.on('end', function () { 14 console.log('no more data') 15}) 16