git ssb

3+

cel / ssb-npm-registry



Tree: d2f2697f296dd39aed6a8b63c6d04a736a7db5b3

Files: d2f2697f296dd39aed6a8b63c6d04a736a7db5b3 / node_modules / pull-stream / sources / count.js

216 bytesRaw
1'use strict'
2
3module.exports = function count (max) {
4 var i = 0; max = max || Infinity
5 return function (end, cb) {
6 if(end) return cb && cb(end)
7 if(i > max)
8 return cb(true)
9 cb(null, i++)
10 }
11}
12
13
14

Built with git-ssb-web