array-stream

Convert a stream to an array

npm install array-stream
14 downloads in the last day
109 downloads in the last week
330 downloads in the last month

array-stream

build status

browser support

Convert a stream to an array

Example

var toArray = require('array-stream')
var s = toArray(function (list) {
    assert.deepEqual(list, [
        "one"
        , "two"
        , "three"
        , "four"
        , "five"
    ])

    assert.end()
})

s.write("one\ntw")
s.write("o\nthree\nfo")
s.write("u")
s.write("r\nf")
s.write("iv")
s.end("e")

Installation

npm install array-stream

Contributors

  • Raynos

MIT Licenced

npm loves you