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
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