Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    lazy-filter-streampublic

    lazy-filter-stream

    Wrap a stream with a filtering

    Example

    var from = require("read-stream").fromArray
        , to = require("write-stream").toArray
        , filter = require("lazy-filter-stream")
        , assert = require("assert")
    
    // filter(stream, iterator)
    var odds = filter(from([1,2,3,4,5]), function (value) {
        return value % 2
    })
    
    odds.pipe(to([], function (list) {
        // the odd values
        assert.deepEqual(list, [1, 3, 5])
        console.log("list", list)
    }))
    
    

    Installation

    npm install lazy-filter-stream

    Contributors

    • Raynos

    MIT Licenced

    Keywords

    none

    install

    npm i lazy-filter-stream

    Downloadsweekly downloads

    12

    version

    0.1.1

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar