fromReadableStream
Rx.Node.fromReadableStream(stream)
Converts a flowing readable stream to an Observable sequence.
参数
stream
(Stream): A stream to convert to a observable sequence.
返回值
(Observable): An observable sequence which fires on each 'data' event as well as handling 'error' and 'end' events.
例
var Rx = require('rx');
var subscription = Rx.Node.fromReadableStream(process.stdin)
.subscribe(function (x) { console.log(x); });
// => r<Buffer 72>
// => x<Buffer 78>