0.0.0 • Published 12 years ago
dart-stream v0.0.0
#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
0.0.0
12 years ago