0.1.6 • Published 12 years ago

lazy-map-stream v0.1.6

Weekly downloads
1
License
-
Repository
github
Last release
12 years ago

lazy-map-stream

Wrap a stream with a mapping

Example

var from = require("read-stream")
    , to = require("write-stream")
    , map = require("lazy-map-stream")
    , assert = require("assert")
    , list = []

// map(stream, iterator)
var doubles = map(from([1,2,3,4,5]), function (value) {
    return value * 2
})

doubles.pipe(to(list, function () {
    // the doubled states
    assert.deepEqual(list, [2, 4, 6, 8, 10])
    console.log("list", list)
}))

Installation

npm install lazy-map-stream

Contributors

  • Raynos

MIT Licenced

0.1.6

12 years ago

0.1.5

12 years ago

0.1.4

12 years ago

0.1.2

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago

0.0.1

12 years ago