Skip to content

Commit eeb6fdc

Browse files
zoubinjasnell
authored andcommitted
doc: add docs for more stream options
PR-URL: #4639 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chris Dickinson <chris@neversaw.us>
1 parent b6ab6d2 commit eeb6fdc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

doc/api/stream.markdown

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,7 @@ implement Readable streams in your programs.
858858
* `objectMode` {Boolean} Whether this stream should behave
859859
as a stream of objects. Meaning that stream.read(n) returns
860860
a single value instead of a Buffer of size n. Default=false
861+
* `read` {Function} Implementation for the [`_read()`][] method.
861862

862863
In classes that extend the Readable class, make sure to call the
863864
Readable constructor so that the buffering settings can be properly
@@ -1111,7 +1112,9 @@ also implement the `_flush()` method. (See below.)
11111112
#### new stream.Transform([options])
11121113

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

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

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

0 commit comments

Comments
 (0)