How to use the streaming-iterables.map 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-libp2p-tcp / test / listen-dial.spec.js View on Github external
listener = tcp.createListener((conn) => {
      pipe(
        conn,
        map((x) => Buffer.from(x.toString() + '!')),
        conn
      )
    })
    await listener.listen(ma)
github libp2p / js-libp2p-tcp / test / listen-dial.spec.js View on Github external
listener = tcp.createListener((conn) => {
      pipe(
        conn,
        map((x) => Buffer.from(x.toString() + '!')),
        conn
      )
    })
    await listener.listen(ma)
github ipfs / js-ipfs / src / core / components / repo / gc.js View on Github external
async function createMarkedSet ({ pin, pinManager, refs, repo }) {
  const pinsSource = map(({ cid }) => cid, pin.ls())

  const pinInternalsSource = (async function * () {
    const cids = await pinManager.getInternalBlocks()
    yield * cids
  })()

  const mfsSource = (async function * () {
    let mh
    try {
      mh = await repo.root.get(MFS_ROOT_KEY)
    } catch (err) {
      if (err.code === ERR_NOT_FOUND) {
        log('No blocks in MFS')
        return
      }
      throw err

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