How to use the streaming-iterables.parallelMerge 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 ipfs / js-ipfs / src / core / components / repo / gc.js View on Github external
log('No blocks in MFS')
        return
      }
      throw err
    }

    const rootCid = new CID(mh)
    yield rootCid

    for await (const { ref } of refs(rootCid, { recursive: true })) {
      yield new CID(ref)
    }
  })()

  const output = new Set()
  for await (const cid of parallelMerge(pinsSource, pinInternalsSource, mfsSource)) {
    output.add(cidToString(cid, { base: 'base32' }))
  }
  return output
}

streaming-iterables

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

MIT
Latest version published 9 months ago

Package Health Score

74 / 100
Full package analysis