Skip to content

Commit

Permalink
doc: add docs for more stream options
Browse files Browse the repository at this point in the history
PR-URL: #4639
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
  • Loading branch information
zoubin authored and Myles Borins committed Feb 15, 2016
1 parent baa0a3d commit 9ca24de
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion doc/api/stream.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,7 @@ implement Readable streams in your programs.
* `objectMode` {Boolean} Whether this stream should behave
as a stream of objects. Meaning that stream.read(n) returns
a single value instead of a Buffer of size n. Default=false
* `read` {Function} Implementation for the [`_read()`][] method.

In classes that extend the Readable class, make sure to call the
Readable constructor so that the buffering settings can be properly
Expand Down Expand Up @@ -1108,7 +1109,9 @@ also implement the `_flush()` method. (See below.)
#### new stream.Transform([options])

* `options` {Object} Passed to both Writable and Readable
constructors.
constructors. Also has the following fields:
* `transform` {Function} Implementation for the [`_transform()`][] method.
* `flush` {Function} Implementation for the [`_flush()`][] method.

In classes that extend the Transform class, make sure to call the
constructor so that the buffering settings can be properly
Expand Down Expand Up @@ -1296,6 +1299,8 @@ how to implement Writable streams in your programs.
* `objectMode` {Boolean} Whether or not the `write(anyObj)` is
a valid operation. If set you can write arbitrary data instead
of only `Buffer` / `String` data. Default=false
* `write` {Function} Implementation for the [`_write()`][] method.
* `writev` {Function} Implementation for the [`_writev()`][] method.

In classes that extend the Writable class, make sure to call the
constructor so that the buffering settings can be properly
Expand Down

0 comments on commit 9ca24de

Please sign in to comment.