diff options
Diffstat (limited to 'deps/npm/node_modules/sorted-union-stream/example.js')
-rw-r--r-- | deps/npm/node_modules/sorted-union-stream/example.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/deps/npm/node_modules/sorted-union-stream/example.js b/deps/npm/node_modules/sorted-union-stream/example.js new file mode 100644 index 0000000000..846d2b1103 --- /dev/null +++ b/deps/npm/node_modules/sorted-union-stream/example.js @@ -0,0 +1,15 @@ +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') +}) |