Skip to content

Latest commit

 

History

History
37 lines (22 loc) · 859 Bytes

write_to_stream.md

File metadata and controls

37 lines (22 loc) · 859 Bytes

writeToStream

Rx.Node.writeToStream(observable, stream, [encoding])

#

Writes an observable sequence to a stream.

Arguments

  1. observable (Obsesrvable): Observable sequence to write to a stream.
  2. stream (Stream): The stream to write to.
  3. [encoding] (String): The encoding of the item to write.

Returns

(Disposable): The subscription handle.

Example

var Rx = require('Rx');

var source = Rx.Observable.range(0, 5);

var subscription = Rx.Node.writeToStream(source, process.stdout, 'utf8');

// => 01234

{% if book.isPdf %}

{% else %}

Location

  • rx.node.js

{% endif %}