mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
313 B
16 lines
313 B
8 years ago
|
var union = require('./')
|
||
|
var from = require('from2')
|
||
|
|
||
|
var sorted1 = from.obj([{key: 'a'}, {key: 'b'}, {key: 'c'}])
|
||
|
var sorted2 = from.obj([{key: 'b'}, {key: 'd'}])
|
||
|
|
||
|
var u = union(sorted1, sorted2)
|
||
|
|
||
|
u.on('data', function (data) {
|
||
|
console.log(data)
|
||
|
})
|
||
|
|
||
|
u.on('end', function () {
|
||
|
console.log('no more data')
|
||
|
})
|