How to use the pull-stream.asyncMap function in pull-stream

To help you get started, we’ve selected a few pull-stream examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ssbc / ssb-ebt / test / simple.js View on Github external
function Delay (d) {
  d = d || 100
  return pull.asyncMap(function (data, cb) {
    setTimeout(function () {
      cb(null, data)
    }, ~~(d + Math.random()*d))
  })
}

pull-stream

minimal pull stream

MIT
Latest version published 1 year ago

Package Health Score

60 / 100
Full package analysis

Similar packages