How to use the streaming-iterables.tap function in streaming-iterables

To help you get started, we’ve selected a few streaming-iterables 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 libp2p / js-interfaces / src / stream-muxer / spawner.js View on Github external
const listener = new Muxer(async stream => {
    expect(stream).to.exist // eslint-disable-line
    check()

    await pipe(
      stream,
      tap(chunk => check()),
      consume
    )

    check()
    pipe([], stream)
  })

streaming-iterables

A collection of utilities for async iterables. Designed to replace your streams.

MIT
Latest version published 1 year ago

Package Health Score

67 / 100
Full package analysis