JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 140934
  • Score
    100M100P100Q146509F
  • License ISC

Filters the passed iterable by using the filter function

Package Exports

  • it-filter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (it-filter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

it-filter

Build status Coverage Status Dependencies Status

Filters the passed (async) iterable by using the filter function

Install

$ npm install --save it-filter

Usage

const all = require('it-all')
const filter = require('it-filter')

// This can also be an iterator, async iterator, generator, etc
const values = [0, 1, 2, 3, 4]

const fn = val => val > 2 // Return boolean or promise of boolean to keep item

const arr = await all(filter(values, fn))

console.info(arr) // 3, 4