How to use the streaming-iterables.filter 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 / block / rm.js View on Github external
const has = await blockService._repo.blocks.has(cid)

            if (!has) {
              throw errCode(new Error('block not found'), 'ERR_BLOCK_NOT_FOUND')
            }

            await blockService.delete(cid)
          } catch (err) {
            if (!options.force) {
              result.error = `cannot remove ${cid}: ${err.message}`
            }
          }

          return result
        }),
        filter(() => !options.quiet)
      )
    } finally {
      release()
    }
  }
}

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