stream-orderby
v0.0.2
Published
order by for stream json objects on nodejs
Downloads
4
Maintainers
Readme
stream-orderby
orderby for stream json objects on nodejs
##example: ###stream.pipe API
generator(5).pipe(orderBy([
{
keys: 'grade.name,value',
reverse: true
}, {
getValue: function(doc) {
return doc.age;
},
reverse: false
}, 'name'
])).on('data', function(doc) {
return console.log(doc);
}).once('end', function() {
console.log("order by end.");
});
if you read array object to order by,you can use event-stream
readArray