git ssb

2+

Dominic / pull-stream



Tree: 4820f821d54b2ca1d9ea1519cc0f56cd89b7fe98

Files: 4820f821d54b2ca1d9ea1519cc0f56cd89b7fe98 / sinks / reduce.js

209 bytesRaw
1'use strict'
2
3var drain = require('./drain')
4
5module.exports = function reduce (reducer, acc, cb) {
6 return drain(function (data) {
7 acc = reducer(acc, data)
8 }, function (err) {
9 cb(err, acc)
10 })
11}
12
13

Built with git-ssb-web