How to use the pull-stream.through 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 log (name) {
  return pull.through(function (data) {
    console.log(name, data)
  })
}
github peer-base / peer-base / src / collaboration / protocol.js View on Github external
function passthrough (_onEnd) {
  const onEnd = (err) => {
    try {
      _onEnd(err)
    } catch (err2) {
      if (err2) {
        console.error('error in onEnd handler:', err2)
      }
    }
  }
  return pull.through(
    null,
    onEnd)
}
github peer-base / peer-base / src / stats / stats-protocol.js View on Github external
function passthrough (_onEnd) {
  const onEnd = (err) => {
    try {
      _onEnd(err)
    } catch (err2) {
      if (err2) {
        console.error('error in onEnd handler:', err2)
      }
    }
  }
  return pull.through(
    null,
    onEnd)
}

pull-stream

minimal pull stream

MIT
Latest version published 2 years ago

Package Health Score

57 / 100
Full package analysis