No description or website provided.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
index.js
package.json
readme.markdown

readme.markdown

DartStream

create a duplex stream kinda like how I imagine they might in dart.

var dartStream = require('dart-stream')

var ds = dartStream(function readable () {
      //get data like this:
      var data
      while(data = this.readIn()){
        //write data like this:
        this.writeOut(data)
      } 

    }, function ended() {
      this.writeEnd()
    })

streams are buffered at both the readable and the writable side.

tests

this stream is tested with stream-spec and stream-tester