hyperreduce
Distributed reduce on top of hypercore.
Usage
const hypercore = const memdb = const reduce = const core = const inp = core const head = { last = last || 0 console } inpinpinp
Why
We believe ops doesn't need to be complicated. If hypercore
is distributed
streams, hyperfilter
is a distributed reducer for streams. We needed this to
to turn our feed of server errors into a single meaningful value.
API
getLasthyperReduce(inputFeed, db, reducer(last, data, next), done?)
Create a new reduce function that reads data from an input hypercore
feed to
and applies the reducer
function.
getLast(cb(err, last))
Get the last value from hyperreduce
.
Installation
$ npm install hyperreduce
See Also
- https://github.com/mafintosh/hypercore
- https://github.com/mafintosh/hyperpipe
- https://github.com/mafintosh/hypername
- https://github.com/mafintosh/hyperfilter
- https://github.com/yoshuawuyts/hypertail