Nutella Pancake Machine

    it-filter
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.3 • Public • Published

    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

    Keywords

    none

    Install

    npm i it-filter

    DownloadsWeekly Downloads

    29,754

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    3.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • achingbrain