git ssb

2+

cel / scuttlebot.io



Tree: 2bb2f9e22cb3fc3c6bf54323d0c3b964ab7b2da8

Files: 2bb2f9e22cb3fc3c6bf54323d0c3b964ab7b2da8 / tmpl / apis / pull-stream / pull-paramap.md

699 bytesRaw

pull-paramap

parallel mapping pull-stream.

travis

testling

example

var pull = require('pull-stream')
var paramap = require('pull-paramap')

pull(
  pull.values([....]),
  //perform an async job in parallel,
  //but return results in the same order as they went in.
  paramap(function (data, cb) {
    asyncJob(data, cb)
  }, width), //optional number.
             //limits stream to process width items at once
  pull.collect(cb)
)

License

MIT

Built with git-ssb-web